If you're working for a company, you can consider volume licensing for multiple virtual machines with same Windows version (depending on applied scenario, see "Licensing Windows desktop operating system for use with virtual machines" part).
Based from reference above, one of the scenario which I think likely fit to your issue probably like this:
Scenario: Local Windows Virtual Machines
Description:
An organization has a group of developers who need to test an
application across multiple Windows images running in local virtual
machine on PCs running Windows 10 Pro.
Licensing Solution:
The PC or the primary user of the PC needs active Windows Software
Assurance, which permits running up to four virtual machines
concurrently.
Normally with retail version a standalone VM treated as single machine and requires separate retail license, but in case of volume licensing for companies you can use WSA/VDA subscription to permit access with installed Windows in virtual machines.
NB: If you're not sure that how virtual machines treated in volume licensing mechanism, read Product Keys FAQ for details.
Similar issues (written for previous Windows versions, but may still apply for nowadays):
How does Windows 7 licensing work for running the OS as Virtual Machines?
Windows Activation FAQ: How do language, version, 64-bit or 32-bit, and source affect ability to install and transfer Windows licenses? (see Multiple Installations part)