Can you learn a language where you won't/can't travel?

Hello, and by that, I mean countries that are at peace and not in conflict or war, like Ukraine and Russia, because you can't enter them (normally) anyway. And I'm also leaving out English, because it's the lingua franca of the internet anyway. I mean more languages ​​that you would like to speak or if…