This sort of thing is best handled through proper use of anchoring and scaling in your UI.
Here are some notes on UI Anchoring, Scaling, CanvasScaler, etc: