What is the best way to display game view in a limited section of the screen?

I am creating a game, where UI takes a big part of the player screen. Normally I would simply overlay UI elements on top of the game view, but the camera in game view is top down and is centered on the player, and simply overlaying elements would distort the proportions of the visible area or make the camera position calculation rather messy.
I want to limit game view to a square, which occupies specific part of the screen, ideally with a possibility of adjusting where this square is located (i.e left-right-top-bottom alignment), basically making the game view a UI element, which can be manipulated similar to any other.
I know about the render texture concept, but I have little experience with it, so I wanted to ask if it is the right solution in this case. (Also, when I try to use it, for some reason the resulting image is really blurry, but that is likely a mistake in implementing it).

The most fundamental way to modify your viewport is to use Camera.rect to modify the position and scale of your display. The catch, however, is that a square (for example) would need to be generated relative to the current screen resolution. For example, you could do something like:

public float targetHeightPercentage = 0.4f;
public float aspectRatio = 1f;

// ...

// Convert from int to float for easier math conversions
float screenWidth = Screen.width;
float screenHeight = Screen.height;
float screenAspect = screenWidth / screenHeight;

// Example: 1:1 ratio, 1920x1080 -> 0.4x height:
// 1080 * 0.4 = 432
// 1920 * 0.4 / 1.777~ = 432
float targetWidthPercentage = screenHeight * targetHeightPercentage / screenAspect;

Camera.main.rect = new Rect(posX, posY, targetWidthPercentage, targetHeightPercentage);