So, it's not hallucinating, that does in fact say it's an s24 ultra from t-mobile.
So initial things. That's an american phone. It will not get any updates outside of america. Whoever sold it to you probably got it for super cheap or even stole it. Even if it said it was an s25, the "XAA" means it will never update without being on an american network. I've seen buying a cheap american sim card can make it update. Though that's a pain and not guaranteed.
As for the s24 ultra thing, it's the first time I've seen a model number mismatch. I have an idea on what's going on but I'd like you to check something for me.
Open the samsung members app (this app), go to the support section, press diagnostics, run a diagnostics on the software. I have a theory that someone might have flashed s24 ultra software onto it to maybe bypass stolen device protection.
If the system software checks say normal, then this really is strange. I'm expecting it to say something is wrong