Azure AD Connect must be installed on a domain-joined Windows Server 2019 or later, so make sure that you are using the correct version. Versions 6.1.7601 or higher should be accepted.
https://learn.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-install-prerequisites
I have also seen a similar issue if the sync service account has issues retrieving credentials. Could you try logging in with an admin account that never logged onto this server before and attempt a reinstall?
In addition, the error you cited can be caused by the SQL Server Native Client not supporting TLS 1.2. To fix this, you would need to install SQL server Express and ensure that the LocalDB is also installed.
Related issues:
Azure AD Connect fails to install
Let me know if you still face this issue after confirming these things. It would also help to be able to see the Event logs and system logs.
If the information helped you, please Accept the answer. This will help us as well as others in the community who may be researching the same issue. Otherwise let me know if you have further questions.