Hi, I'm Shamim Hossain
Answer some questions and I will help you to figure out the right CSS unit for your project.
Assuming you are only using these units for web development, not for print media.
em rem px
It depends a lot on the use case. If you want a fixed value, rem or px are fine. If you want something that is a bit more adaptable, em is great. I love using it for buttons, so that the padding adjusts automatically if I make small and large variants by changing the font size.