If you’re talking UI, you need to set the anchors properly. See below.
If you’re talking raw sprite, then the camera height (ortho) can give you the proper width by the ratio of Screen.width vs Screen.height, just do it in a little script if it must change, or make it worst-case for 1920x1080 or whatever you want.
Here are the official docs on how to make your UI handle various resolutions and aspect ratios cleanly:
Here are some notes on UI Anchoring, Scaling, CanvasScaler, etc: