What you just said is really clear. You can tell him not to do those things anymore, and/or bring up that they’re sexual harassment. But tbh I don’t think you need to feel too worried about whether youre being perfectly nice. People should really know not to do those things. Imo, You’d honestly be generous to even explain this to him as opposed to simply stopping being friends.