My iPhone does this occasionally, even though I use it all the time. It’s to the point occasionally I’ll unlock it with fingerprint and an hour later it wants me to put in my password.
Here’s my theory. Apple does this on purpose even if your a heavy iPhone user and use your phone all day and night..... if Apple never asked for your passcode, you may forget it. So I’m cool with it asking me once and a while so it’s not forgotten. Just my two cents[emoji6]