I would suggest the below steps for this
1-Install new VM with server 2020
2-Migrate FSMO roles
If you have enough capacity
3-Create one more new VM with server 2022
4-Make it an additional domain controller
5-Decomssion secondary domain controller(remote ADDS) from old 2012
6-Do an in-place upgrade of the old Secondary domain controller, then you don't need to do any file migration
If you don't have enough capacity
ignore step 3 above
Follow step 5,6
then
7-Promote the upgraded server as a secondary domain controller