How to build 3rd person lock-on system that keeps both player and target in frame using Cinemachine

I found this before I started.
https://www.reddit.com/r/Unity3D/comments/mxjmkb/3rd_person_lockon_system_that_keeps_both_player/
I’m a newbie and trying to replicate that link.
I would like some advice on how to create a Lock On System.

Now I have created a 3rd person camera from Free look Cinemachine (Camera-Relative Movement) and created another Cm Camera for Target Group to create a camera for Look On Target.


I am thinking of changing the position control to an orbital camera so that I can still control the camera independently and if the target is outside the window, the camera will automatically adjust to a position where I can see the target.