Fingerprint failures are often caused by dry or wet fingers, dirt or screen protectors.
1. Clean the sensor and your finger.
2. Delete your fingerprints and register them again, rolling your finger to cover the edges.
3. Register the same finger twice if allowed.
4. For sensors under the screen, use a protector that says it supports in-display fingerprint.
5. After a screen replacement, an incell or TFT screen won't work with an under-screen sensor.
6. For side or back sensors, check the flex cable and connector.
If the phone says "sensor not available", the sensor or its connection is faulty.