This article explains how to use an HDMI switch with a monitor and a TV.
How to Use an HDMI Switcher – Simple Guide
Using an HDMI switcher to toggle between a monitor and a TV as your device's active display works the same as using any two displays with an HDMI switcher.
Before you begin, you will need a device such as a computer or game console, as well as the HDMI switch and a few HDMI cables. Make sure your switch and cables are capable of the resolution and frame rate you want to output.
Turn on your switch and connect its input to the device you want to display, such as a computer, game console, or anything else with an HDMI output.