What you do is what I did when my Pixel 2 fingerprint sensor stopped responding - contact the manufacturer (although with Samsung, good luck). The sensor has to be replaced, which normally means that you'll probably have to pay for it (unless you bought the phone long after it came out), and that might even mean that they'll just send you a refurb - so back everything up first (see Backing up an Android Device). Smart Switch will back up some things, but not all.