Connect an external display. Sometimes it can be difficult to get video on the external display. You can try logging in blindly where you can then press Command + F1 to toggle display mirroring which should give you the screen as on the internal display would show. Unfortunately this key combination does not work until you are logged in. If you have icons for user accounts on the login screen, then type the first character of the user name and press the "Return" key. Then enter the password, again pressing the "Return" key to submit the password. If your login screen is presented differently, then you need to try to see if you can find a way to log in.
Otherwise you can try putting the laptop into Clamshell mode. This requires the charger to be connected as well as a wired USB keyboard & mouse. Once the laptop is powered on, close the lid of the laptop's display and hope you get video on the external display.
Normally I would suggest putting the laptop into Target Disk Mode, but I don't think you can do this on an Apple Silicon Mac if the display is not working since you must actually interact with the screen to activate Target Disk Mode. At least Intel Macs could be put into Target Disk Mode without a working screen since you just needed to hold the proper key at the proper time. Apple takes so many steps backwards.
FYI, you should always have frequent and regular backups of your computer and all external media (including the cloud) which contains important & unique data. It is impossible to recover accidentally deleted data from an SSD after the Trash has been emptied. Plus an SSD can fail at any time without any warning signs...even a brand new SSD. In addition, the data on the SSD is now hardware encrypted using the secure enclave chip on the Logic Board. This means you need a working Logic Board in order to even decrypt the SSD. You also need to be able to authenticate to this secure enclave chip. In my own personal experience (at least with Intel 2018+ Macs), sometimes it may be impossible to properly authenticate to the secure enclave chip. Even an expensive professional data recovery service may be unable to recover data. There are a lot of ways to lose access to data on an SSD and the 2018+ Macs since the SSDs are now integrated into the Logic Board with most 2018+ Macs.