The autofill UI is designed to be used for exactly this use case. You call WebAuthn in a conditionally mediated mode on page load, which will offer the autofill UI experience to the user.
https://passkeys.dev/docs/use-cases/bootstrapping/#authenticating-the-user
This is the recommended experience if your login screen has a username / identifier field.