There is no way to be sure, but there is a good general rule to discriminate between software, and hardware or other physical problems. If the problem is repeatable, reproducible with a defined series of steps it is likely to be software. If it is hardware it is more likely to be random or intermittent.
I don't see how software issues are likely to break finger recognition for a few users without everyone seeing the problem, and there is no general chorus if distress here. The system doesn't actually store the fingerprint as an image, it creates a mathematical hash which is then compared with a similar hash from future scans. Given that Apple has several years of successful implementation with iPhones and iPads it is more likely than not any significant bugs in the software would have been found by now. That seems to leave a hardware problem or physical changes to the finger ridges as the prime suspects. I tend to rule out hardware problems because when problems occur it still seems to work to enrol a new finger, which may become progressively less reliable over time.
Based on experience over several years since my iPhone 6s I am convinced the problems are due to short term changes or distortion of the target fingerprint. I have learned what tasks will wreck my fingerprint, and every time I do these things there is a pretty good correlation with having to key a passcode the hard way.
I got lucky with my new MacBook, it arrived just as I started a few easy weeks over Christmas and my fingers didn't get messed up. Work started again after New. Year, and sure enough I have been plagued with failures again. From experience I know if I got lucky and enrolled a "clean natural" fingerprint the scan will start working again as my fingerprint recovers. If I was unlucky and enrolled a damaged or distorted print it will become unreliable then fail as my finger recovers to its natural condition.