@Mārcis Apologies for the delay in reviewing this post, was researching on your issue and then came across your post on stackoverflow as well - https://stackoverflow.com/questions/75458684/azure-ad-connect-do-not-start where you mentioned Os version is Windows Server 2022.
As per this documentation, we have mentioned installation of Azure AD Connect on Server 2022 is not yet supported.
Would recommend installing Azure AD Connect on a different server with the prerequisites mentioned in the above shared article and configure it in staging mode before moving it to production.
Azure AD Connect Staging mode - https://learn.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-sync-staging-server
Let me know if you have any further questions, feel free to post back.
Please remember to "Accept Answer" if answer helped, so that others in the community facing similar issues can easily find the solution.