Well, the answer to this is heavily linked to the early days of space exploration and the politics at play during that time. Back in the days of the space race, it was important for America and Russia to differentiate the people being trained to go on missions in space. After all, they were in a very serious competition with each other and it’s not surprising that they’ve chosen different names despite being the same role, essentially.
This was then quickly picked up by the media and newspapers who would always refer to cosmonauts whenever they were publishing articles about the soviet space program. This never really went away since.
Other space agencies, like the ESA, the CSA, and JAXA, just call their space travellers “Astronauts.”
However, some new terms have been surfacing those past few years: spationaute in France and Taikonaut in China.