Oh, boy, can I tell you. After my 2 sensor stopped working, they sent me 4 phones, one at a time, and none of them worked. (I ended up working with one of their developers, and asked him if they could send me a new finger.)
You checked in Settings > Security > Pixel imprint?
The first thing you can try, though, is to put your finger in your mouth and get it warm and wet (not shriveled - that's what causes one of of the problems). Then wipe it off and see if the sensor works.
If it's not there, wait for the next update - it should be Tuesday. (The bootloader has to be unlocked for this - if it's not, you'll have to unlock it in Developer options, then run fastboot to unlock it in software.
This wipes your phone, so if you have to unlock it, back up EVERYTHING first. Go to
https://developers.google.com/android/images#taimen and download the full ROM. Unzip it and open the appropriate flash-all file (.bat for Windows, .sh for Mac or Linux) and delete the -w on the last fastboot line. Then flash the factory ROM (removing the -w keeps it from wiping your data and apps). Make sure that you're using a USB 3.1 port and a USB 3.1 cable, or something in there (port or cable) that's USB 2. Pixel 2s (regular and XL) don't like USB 3.0. (If the bootloader is already unlocked and you don't have TWRP installed, at least boot the twrp.img file and back everything up, then restart and copy the backup file somewhere off the phone (even Drive will do). Assuming that you don't want to use TWRP to install itself. If you do just boot the img file, then install the zip file.
If you get stuck, you can download
Deuces Bootloop-Recovery - XL and flash it that way. Just tell it "no" when it asks if you want it to "Format Userdata?"
If all else fails, go to
Get a call from a Google Support Specialist - Pixel Phone Help. Or, if it's out of warranty, and you're in the US,
uBreakiFix.