It sounds like the problem happened while your Mac was mirroring its screen to your LG TV and you opened Photo Booth.
The Mac then froze and its screen went black, while the TV continued showing the Photo Booth image.
Since you do not remember the error message, there's not enough information to determine what caused it.
If your Mac is working normally now, I would not make any major changes.
Make sure macOS and the TV are up to date, confirm that both are connected to the same Wi-Fi network and that AirPlay is enabled on the TV, then restart both devices and try screen mirroring again.
These are among Apple's recommended steps for AirPlay problems. Apple: If screen mirroring or streaming isn't working
If everything works normally without mirroring, you can then try opening Photo Booth while mirroring.
If the problem occurs again, note exactly what happened and, if possible, photograph the error message.
If macOS reports that your Mac restarted because of a problem, keep that message available because it may provide useful information for further troubleshooting. Apple: If your Mac restarted because of a problem
If the Mac becomes unresponsive and will not restart normally, press and hold the power button for up to 10 seconds to turn it off, then turn it back on. Apple: If your Mac starts up to a blank screen