There are a lot of variables there. The technical answer is "Maybe."
It should be, but your phone has to be unlocked. That just means for example that if you bought your phone under contract with AT&T they might have locked the phone to only be used with their network.
It is a normal request to unlock it. You would just have to call your carrier and ask them to unlock it.
I don't know if it is still the case but for a while Verizon would boast that all their phones were unlocked.
There are also some details regarding the IMEI number of the phone being associated to the account, but I have never had that be a problem there. I think that might be a U.S. carrier thing.
I typically bring my most recently retired cellphone along with my current cellphone so the older one becomes my CR phone and my new current phone stays in the room. I know it is unlocked and the IMEI is not associated to anything. I also don't worry about the older one getting lost, dropped or walking away.
Here is a link
https://mytanfeet.com/about-cr/prepaid- ... osta-rica/