I have encountered login issues with some of my organization's Macs running macOS 14.x Sonoma. The issue seems to only occur on the lock screen when macOS locks the computer after a set period of time or when the Mac goes to sleep. In those cases we must force a power off & boot the Mac again so that we can log in. Annoying bug, but work around it.
That is the only login issue I've encountered. No login issues when rebooting the Macs. Unfortunately with the 2018+ Macs with the security enclave chip, there is nothing you can do to fix things if Apple's standard password reset options to not work. I guess you an try booting into Safe Mode, but I'm doubtful that will help you either. Maybe try a DFU firmware Revive....again doubtful it will help, but it will reset the security enclave chip which controls everything on these 2018+ Macs.
You should start backing up your computer so that you minimize the risk of data loss. Apple includes the Time Machine app for free with macOS to easily backup your Mac. There are a lot more new ways of permanently losing access to your data these days due to all the hardware, software, and security changes. Backups are more important now than ever before since most times there is no way to even attempt data recovery.