I think the first way to protect yourself is to switch from T-Mobile they have notoriously bad security. In fact with all the recent leaks I don’t understand what they can do to actually safeguard accounts against SIM swap attacks.
The most secure way to protect against SIM swap attacks is not to use a SIM based number for 2fa. I’d suggest using a Twilio, Telnyx, or similar service where you have more control over the number and even the porting process.