I am replacing vanity and removing wallpaper to paint. I am currently removing the wallpaper. Do I install the new vanity before painting or after?
You don't have to worry about getting paint on the vanity.
Areas that would be hard with the vanity in place - in my bathroom, small wall sections on each end underneath the vanity since the countertop is wall-to-wall but the vanity is (deliberately) a little shorter - are very easy.
If you ever replace some or all of the vanity, countertop, etc. and the replacement is slightly smaller you won't end up with unfinished areas that then need to get painted.
But overall it is just simpler to paint large sections of walls than dealing with lots of edges.