Nuacht

In this case, you'd need to connect an external keyboard and mouse/trackpad as well. I wanted to use my two new monitors and still have access to my MacBook's screen.
Plain non-Pro/Max M1 and M2 Macs are limited to connecting just a single monitor but you can connect two displays to an M1 or M2 Mac with some software and hardware solutions.