There are a number of services advertised online to address this requirement. It might be helpful if you mention those you have already evaluated and the reasons you rejected them.
Here's what I tried:
Google Voice (GV)
Only after trying, I discovered that GV is not supported in Japan where I live. You can download GV in Japan but you cannot get a phone number in Japan (and in other countries where GV is not supported). If you're overseas, Google can detect where you are located even if you use a VPN with a US IP address, so you cannot get a GV phone number. If you download GV in the US while having a US-based phone number (even a virtual phone number), you can obtain a phone number there and take that with you and use it overseas, but you cannot accomplish that in Japan or wherever GV is not supported. Also, according to most reports, GV does not forward SMS from banks and financial institutions for 2FA, through one FT user reports success with Cap 1. In short, you need to download GV before traveling overseas, and even then it is not guaranteed that you can receive text messages from Cap 1. I need to find another solution, as I have no immediate travel plans to the US where I could download GV and only hope that it works for 2FA. None of the virtual phone services that I've seen online advertise if SMS from banks and financial institutions can be transmitted, and from my research, it appears they cannot in most cases.