Were you able to boot this laptop normally to reach the normal login screen prior to attempting a password reset?
What happened after the last successful login to this laptop?
If you click "Restart", will the laptop boot normally to reach the regular login screen?
If so, are any macOS user accounts displayed on screen? With macOS Sonoma, if there is a login icon, you will need to hover over the icon (or click on it) in order to see other macOS user accounts to choose. If so, try using an external keyboard to enter your password. If you can log in, then make a backup immediately since you may not get another chance.
Do you have a good backup?
At this point you are limited to reinstalling macOS. How this is accomplished depends on whether you can boot into Internet Recovery Mode without authenticating since the T2 security chip has no macOS admin user accounts to authenticate against. If you can boot into Internet Recovery Mode, then you can try reinstalling macOS over top of itself, or beside itself on a new APFS volume you create. Otherwise, you will need to perform a DFU firmware Restore to reset the T2 security chip & system firmware (destroying all data on the internal SSD) followed by booting into Internet Recovery Mode to reinstall macOS.
FYI, if you cannot authenticate to the T2 security chip, then you will be unable to access the data on the internal SSD.
Worst case scenario (yes, it can get worse) is this laptop has a hardware failure with the Logic Board. Unfortunately the Logic Boards of the MacBook Pro 16" (2019) model have a very high rate of failure compared to earlier models. In fact, there are many posts on this forum recently where users have reported having Logic Board failures even after having their Logic Boards replaced by Apple (some have had issues even after two Logic Board replacements). I definitely do not recommend spending any money on repairs to this laptop.....the money spent on repairs is better put towards a new laptop.