It depends on the website that supports AutoFill. Each element uses a HTML attribute tag to label the field for the appropriate stored Username/Password. Some websites have one page to enter the Username and then goes to another page to enter the Password, and this is still possible with Autofill, but requires additional work by the web designer to correctly label those text fields.
I assume you are just seeing this issue on certain websites, while others are working fine. If you want to share what website(s) are giving you problems, I can further review the attribute tags assigned to the elements for confirmation, but the changes would come from the web designer.
When the Username is not being saved to Autofill the password, you can also go into the Passwords app and edit it to include the Username. This developer page is intended for web designers and shows what they need to do to correctly support Autofill. These are standardized HTML attributes that are used by all web browsers including Chrome and Firefox, so I would expect the same thing would happen with those ones too.
Enabling Password AutoFill on an HTML input element | Apple Developer Documentation