None of that is your fault. It's called SIM swapping. Unfortunately common and there's not
much you could've done to prevent it.
For the rest of us, this article might help. TL;DR: two-factor authentication with SMS is not very strong. Use an authentication app, or even better a physical security key.