Install Cinemachine from the Package Manager [in Unity registry]
On your Main Camera add a Cinemachine Brain component
Then from the Create menu > Cinemachine > Virtual Camera, it will come with a default name of something like CMVCam1, reset t's transforms
If t didn't happen automatically, there should be a place on the Cinemachine Brain component of your main camera to link the virtual cam, link them
On the virtual camera, under Follow, drag in the GameObject you want it to follow [i.e. the player] Under Body set it to Framing Transposer
Play around with the camera settings until it looks good to you! [Camera Distance is a big one; Dead Zone width and height will change how quick the camera is to catch up to the follow object]