In general, there are two methods. The first is habit, and you don’t need to do anything. Another way is to communicate with him and make him aware of the problem, so that he can improve it.
But generally speaking, most people will not tell them directly about their roommates who don’t like to be clean. Because saying it directly will damage your roommate's face, it will be more or less awkward to get along with you in the future, and it may make your roommate mistakenly think that you look down on him, which will affect the relationship between roommates. Therefore, if his personal hygiene is not very bad, don’t argue with him. You will get used to it after a few days...
I also have a roommate who has terrible personal hygiene. Every time I take off my shoes, an unpleasant smell comes out, and I only have to take a few showers. But we didn't tell him because we were afraid that he would be embarrassed. After all, if it were you, you would definitely feel embarrassed. How should I put it... Although he doesn't pay much attention to his personal hygiene, I think you still need to be aware of other people's problems and correct them. If you talk to him, it is easy to treat him as a donkey with good intentions...
But if he is really too sloppy or you want to make him better, you also need to discuss it with him. It's best to tell him this kind of thing privately and in some hidden way. Let him understand his own hygiene issues, and also let him understand the importance of personal hygiene and personal image. It actually has a very important relationship with his future development and getting along with others. If he doesn't change it now, it will definitely have a bad impact in the future. Of course you have to be prepared for him to hate you. After all, few people will admit their wrong habits. It is difficult to change a habit, but it is not without hope.