If you have dry hands, the under display fingerprint sensor can be unreliable. I went from a pixel 4 (had a pixel 2 before that) to the 7 and miss the pixel 4.
The 7 is great in all other regards but the fingerprint sensor only works like 30% of the time. Seems like it varies from person to person though - other folks report no problems with the sensor.
I find my index finger a lot more reliable than my thumb. Also yeah, the dry thing. Sometimes you can give your finger a lick then wipe it on your shirt so it's more hydrated and works...