AFAIK, for your setup, the Windows Server 2022 Standard - 16 Core License Pack should be sufficient. Windows Server 2022 Standard License covers up to 2 virtual machines (VMs) running Windows Server. This means, with a 16-core license, you are entitled to run two Windows Server 2022 VMs.
There is a somewhat similar scenario described at https://techcommunity.microsoft.com/discussions/windowsserver/clarification-on-server-2022-standard-vs-datacenter-licensing/4007327
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin