You are very wrong.
To keep a military base in a country you either need to be allowed to do so, or you have to do so by force, by occupying the country.
Occupation is doable, but very costly. The US did it recently in Afghanistan (which is barely a functioning country itself).
So yeah, it keeping military bases abroad via occupation is doable for some time, but not very feasible. It is more realistic to have a system of allied countries.
It's sort of a meme how people in the US imagine all middle eastern countries to be a bunch of mud huts in the world's largest gravel quarry.
> To keep a military base in a country you either need to be allowed to do so, or you have to do so by force, by occupying the country.
There are all sorts of levers US, China, Russia can pull to in order to put pressure on a country for such things. There's occupation, mutual benefits, long standing agreements post wars, soft power, sanctions, etc. Geopolitics is complicated.