How to deal with mobile resolutions?

Hello, this has been bugging me for a long time, ever since I started to make games for a mobile.

Classic resolution for mobile is 9x16 or more precisely 1080x1920 but there is just so much resolution differences in this field (e.g. my mobile has resolution of 1080x2340)

I ended up just making taller background and making canvas match width of 1080 pixels, everything works except, upper and lower parts for my taller mobile are just blank background, I tried fixing some of the content on the corners but it looks weird so I just left it like it is, but here’s the thing

Recently there has been mobile called OnePlus 8 Pro and it has resolution of 1440x3168, which far more than my background. Now it can’t be even made to match width or height.

How do you deal with this problem?

How are you anchoring your UI elements? Generally you would anchor the elements based on the edges of the screen such that they will be some fixed distance away from whatever the edges are.

I do 1920x1080, then make a canvas and select scale with screen size and there’d be no issues with the resolutions.