There are some good youtube videos that go into good depth on these topics, just search for things like rems v. ems, you’ll find some great breakdowns.
Rems are a popular choice for some layout aspects like paddings, margins, button sizes, because they scale off of the base font size. If the base font size changes, for accessibility, or because you want to change the font size at other breakpoints, those aspects of the layout will scale with it.
vh as a width measure is usually, I think, a typo. There may be a technique there I don’t use however the only really valid situation I can see using it is if you want a 1:1 aspect ratio on something, so you give it a height of e.g. 25vh and also a width of 25vh. It will be square, and 1/4 the height of the viewport.