You need to properly set your Canvas Scaler, it should be on your main canvas Game Object, if for some reason your canvas doesn’t have a Canvas Scaler component add it, like this:
Now set your Canvas Scaler to Scale With Screen Size.
Set the Reference Resolution to your target resolution.
Remember that Canvas Scaler doesn’t work with Render Mode World Space, you have to set it to Screen Space - Overlay or Screen Space - Camera.
It works matching the widh (0 value for scaler match) leaving a lot of void space on top and bottom of the screen, but doesn’t work matching both, width ad hight (original images are whit 0.5 value)
I guess is not possible to make an automatic responsive behaviour so easy…