from fastecdsa import curve, ecdsa, point
from hashlib import sha256
txid = '4a33829b7606d8f3326efdae4580318707c9d68f07b00581209db5308bf491c9'
r = int('218f29a138304bec8bdc08a74f014a472b5053bcbb1f14f525eb08c8d00884a3', 16)
s = int('4c589722a0775fd76227503e8dbf4e4bd51d4dc2745cc5588c23ba7fa2a810f5', 16)
x = int('0afccd21b34449bd18b1ee2f5504b5bc4e2faef14a825dc4b6d0e16a79f5e33b', 16)
y = int('629be62cbde56f8842fa8fd4a33d2656f77ccfc0ad51d9659a7b34fc6c99d840', 16)
Qa = point.Point(x=x, y=y, curve=curve.secp256k1)
hash_bytes = bytes.fromhex(txid)
valid = ecdsa.verify((r, s), hash_bytes, Qa, curve=curve.secp256k1, hashfunc=sha256)
print(valid)
Kindly try this code. But check your transaction hash, public key coordinates, and signature values properly. If everything is good the code will give you true as a result.