MacBooks M1 and M2 do not natively support more than one external display, as others have noted.
However, docks are available that allow you to easily connect two external displays on M1 and M2 Macs:
https://www.macworld.com/article/675869/how-to-connect-two-or-more-external-displays-to-apple-silicon-m1-macs.html
The article explains the issue in detail, and gives a great list of the docks that are available, each using one of two different plugins that work with macOS, to allow you to connect two external displays. The article discusses how they each work, which of two plugins they use to support this on macOS, and average prices for each.) Most of the docks above allow for "extended" mode, although one or two only allow mirror mode, so make note of this in making your selection. They each also use one of two software plugins supported on macOS. Note that M1 and M2 do not support DisplayPort and they do not support daisy-chaining.
I personally used this article to successfully connect two external displays to my 2022 M2 MacBook Air, which I use in closed lid mode. I am personally using the Satechi USB-C Multimedia M1 Adapter, discussed in the above article, and I'll also note that cheaper prices are out there if you look thoroughly.
I hope this helps. This will actually resolve your issue.