This is the magic sauce you need to look into:
Here are some notes on UI Anchoring, Scaling, CanvasScaler, etc: