If you have video on the external display, but not the built-in Display, then most likely the laptop's built-in display has a hardware issue and will need to be replaced.
You can try to clear the NVRAM using the command line by using the following command in the Terminal app.....make sure to reboot the computer after executing the command so the system picks up the default NVRAM settings.
sudo nvram -c
You may see an error related to the computer name not being able to be cleared (perhaps several errors related to it) which is normal. This command also will prompt you for your admin password. Nothing will appear on the screen as you type the password, so press the "Return" key to submit the password.
You may also want to try enabling screen mirroring in the Display System Settings (you may need to "collect the windows" option in Display System Settings so you have access to all parts of the Display settings that may be hidden on the dark built-in screen. Also check the other display related settings for the built-in display.
You can also try reinstalling macOS over top of itself. Normally this won't help much these days, but I just had this fix something that I did not expect it to fix. These newer Macs have a lot of weird quirks.
You can also try a DFU firmware Revive which resets the security enclave chip & system firmware.
I highly recommend you make sure you have a good backup now while you still can if you don't already have a backup. You may not get another chance at saving your data. Just because you were able to finally get video to the external display this time, does not mean you will be successful next time. These newer Macs are very unpredictable and very hard to troubleshoot when an issue like this occurs.