@Pablo888 As others have mentioned, get a pre-paid account. Vivo, TIM and Claro all have some variation of the R$30/month.  I'm currently with Vivo, recently had my Claro number switched to them using number portability. So you can switch back and forth without losing your number if you don't like the choice you made. I believe however, if you are using number portability to keep your number you have to stay with the new carrier for at least 4 months.
Also, all of these carriers have constant promotions when doing the recharge to get additional Gb for free. The method is slightly different between carriers. Vivo, for example, you need to use their app to get the bonus.
The nice thing about the pre-paid plans is that you don't have to kept them active every month. If you leave the country for a few months, just don't pay and when you return recharge and service resumes.
As @abthree mentioned, you do need to be aware the different carriers have rules on how long they will keep your number assigned to you. Generally speaking, if you do a recharge within 90 days of when your credits expired, you'll be fine. If you are out of the country and it's getting close to the 90 limit, you can recharge your number from your brazilian bank account.  I've been doing this with first TIM, then Claro and now Vivo for about 20 years with no issues.
Getting the prepaid plan - skip the TIM/Claro/Vivo stores and get a SIM card from a news stand. What I've found is that clerks in the stores will lie and tell you all kinds of things to get you to signup for a post-paid plan. Been there, done that.
Get your SIM, activate it and then if you want an eSIM for instance, then go to the store and request your phone be switched to an eSIM. I just went through this with Vivo, so bypass the dram
Regarding SMS messages for security checks... that can be challenging. @alan279 it appears, we are both in the same boat. I used Google Voice as my US number and "most" of the time SMS messages for authorizations work fine. What I've found is that a few banks block the use of VOIP number such as Google Voice. Usually, they can send you email, and sometimes they'll do a voice call. What I've found lately is a few of them are not allowing the use of VoIP voice calls. The whole thing is security theater because SMS isn't that secure and the banking industry is still flailing around searching for their perfect solution. I don't know why they just don't use push notifications to their apps, since they all seem to have one.Â
Anyway, what I would recommend for people in the US would be to use Google Voice for their phone number. It doesn't work 100% of the time, but the few times it doesn't you can usually work around it.
For when you are out of country, I would recommend that you install whatsapp on your phone while you are in Brasil. When you leave the country, the account will still work using WiFi. Most businesses here use Whatsapp, so you still have a method for Brasil contacts when out of the country. I normally use Telegram for chats with contacts and keep my whatsapp for business communications.