How do I become an astronaut or an astronomer?
There are various ways of becoming an astronaut and anyone can be an astronomer.
The early US and Russian astronauts were all airforce fighter pilots or test pilot with a lot of experience.
It is somewhat easier now. Every so often an astronaut role will be advertised. There will be a lot of competition and you will need to have the required skills for the role.
Soon, if you have enough money, you will be able to pay for a seat on a commercial spacecraft.
The Fédération Aéronautique Internationale (FAI) rules say that you are an astronaut if you have been on a spacecraft which went higher than 100km. In the USA 50km is recognised.
Anyone who make observations of the Sun, Moon, stars or any other astronomical body is effectively an astronomer. Most astronomers are amateur. Astronomy is one of the few subjects where amateurs can and do make significant discoveries. You will of course have to buy a reasonably good telescope.
If you want to be a professional astronomer, you will need to work for a university with an active astronomy department or an observatory. This will probably require obtaining a PhD in astrophysics.