Tom Cruise obviously works very hard at staying in shape and training for the stunts. It's not like he just shows up and says his lines like most actors.
That said, Top Gun had some pretty incredible makeup and/or CGI for his face. The lighting in that movie was also phenomenal. The result was an almost uncanny valley look to him where he looked simultaneously old and young all at once. I was especially thrown off by the pre-movie screener he produced that thanked the audience for seeing the film in theatres. He looked a solid 5-10 years older in that screener compared to Top Gun, which was filmed mostly in 2019.