Why I can't login to my Mac without typing in my password sometimes?

In 99% of the time, I can log in to my sleeping Mac (M1 MacBook Air) using TouchID. But sometimes it shows that 'password is required to log in' screen, and the TouchID seems to be not working.

This is a very minor issue that I don't care about that much, but I wonder why this happens and also want to know if there is any way to prevent it. I haven't 'mistouched' the TouchID button a few times nor has no one except me tried to log in using TouchID.


Apple documents this here:

https://support.apple.com/en-us/HT204587

A quotation from the article:

To start using Touch ID, you must first set up a passcode on your iPhone or iPad (or a password on your Mac). You must enter your passcode or password for additional security validation:

  • after you restart your iPhone, iPad, or Mac;
  • when more than 48 hours have passed from the last time you unlocked your device;
  • to add or delete a fingerprint to use with Touch ID;
  • to change the iPhone or iPad passcode or Mac system password, and for other security settings like FileVault on your Mac;
  • when there have been more than five unrecognized Touch ID authorization attempts in a row;
  • and after you log out of your Mac.