Hello Krystian Sobala,
Thank you for posting in Q&A forum.
Based on the description, I understand your existing domain is 2016 domain (I mean the domain functional level is 2016), am I right?
If so, it seems you have more than one Domain Controller before you add Windows Server 2022 VM Domain Controller in this existing domain.
Maybe the AD replication issue caused the problem in this thread. You should check AD replication before you add this add Windows Server 2022 VM Domain Controller.
Please run commands below on PDC in the domain.
repadmin /showrepl >C:\rep1.txt
repadmin /replsum >C:\rep2.txt
repadmin /showrepl * /csv >c:\repsum.csv
Here is a similar thread with marked answer for your reference.
https://serverfault.com/questions/758812/dcpromo-prerequisites-for-active-directory-preparation-failed
Here is another link also with the similar error message for your reference.
I hope the information above is helpful.
If you have any questions or concerns, please feel free to let us know.
Best Regards,
Daisy Zhou
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.