Thanks for reaching out to Microsoft Q&A.
Unfortunately, you can't sign in to a Server 2022 or a VM in it using your Entra ID account.
In order to sign in with the device using such credentials, you'd need to Entra ID Join the device. You can actually do it with a server OS, but only for management purposes (i.e. Intune).
Recently, Microsoft has enabled such feature for Virtual Machines and Server OS, but only for Azure VMs as the prerequisites table below describes:
https://learn.microsoft.com/en-us/entra/identity/devices/concept-directory-join
If using Azure VMs is not an option for you, you will need to have on-premises credentials either by using AD or local ones.
Let me know if you have any questions.
Thanks,
Fabio