Years ago, I used Google Voice to receive text messages. Then Twilio came along and I switched to them. Much better.
What in particular are you doing, and how much does that cost?
Alternatively you can use TokTiv a free (limited number of users) PBX from an Indian company that relies on Twilio numbers: https://www.toktiv.com/
I’ve been using it for a year. It’s been buggy at times but improving.
I can’t find the page now, but I’m pretty sure at one point they had a page saying you shouldn’t use it to receive 2FA codes. It’s very common for 2FA systems to blacklist numbers that are known to be used by providers like Twilio.
As far as I am aware, the only reliable way to receive 2FA over SMS is to have a real phone plan.
(Obviously SMS is a poor choice for 2FA in the first place, but sometimes there’s no other option.)