There isn't much to this

I just set it to boot up a shell script.
Make sure you don't run this inside X as the performance is terrible.
You may or may not need the hflip/vflip options depending on the orientation of your camera.
libcamera-hello --width 1980 --height 1020 --framerate 50 --viewfinder-mode 2028:1080:10 --hflip 1 --vflip 1 -t 0 --verbose 0
You can use a different video mode to have a cropped video / digital zoom.
libcamera-hello --width 1980 --height 1020 --framerate 60 --viewfinder-mode 1332:990:10 --hflip 1 --vflip 1 -t 0 --verbose 0
If you want to take screenshots in reaction to a button press or do anything else fancy that would be a Python script. I haven't done that as I haven't had the need, but from a quick google around it is pretty simple.
You can also just take a screenshot with the libcamera commands at the shell.
I've got my Pi's filesystem set to read-only and to boot straight into libcamera so I can just use the power button to turn it on and off.