Can i use windows server 2019 datacenter 16 cores license, to install it onto two virtual machines with 4 cores each, on the host that have 28 cores?
No, you couldn't. The host must be licensed for all cores regardless of the hypervisor used.
https://download.microsoft.com/download/7/C/E/7CED6910-C7B2-4196-8C55-208EE0B427E2/Windows_Server_2019_licensing_datasheet_EN_US.pdf
--please don't forget to upvote
and Accept as answer
if the reply is helpful--