Attestation. If a website requests it, the device will provide cryptographic proof that you used a specific vendor’s device to store the resident credential. The proof is a certificate signed with a vendor’s secret attestation key.
Can't the key get stolen if it's on the client?
Yes, but it’s probably stored in the Secure Enclave, so it’ll be hard work.
Correct. The key material is stored in the Secure Enclave.
The question is more along the lines of: does this provide more security than passwords for real users?
Stealing a password is probably more easily done than stealing a private key that is never transmitted. The primary threat model is protecting the credentials of real users rather than protecting against fraudulent users (though some considerations have been made for that too).
How does the server know for sure if the client is on an iOS Safari browser on an iPhone with FaceID or a custom browser on any OS and any non-locked-down hardware being run with Selenium?