Windows keeps its own DNS cache, and you can read it.
From a command prompt:
ipconfig /displaydns
ipconfig /flushdns
Microsoft’s docs say the first one shows the contents of the resolver cache, including entries preloaded from the local hosts file and recently obtained records. So it doubles as a check on whether your hosts file edit was picked up.
/flushdns clears the cache. The docs mention that it also discards negative entries, meaning cached failures. That is the reason to run it after you fixed a record that was missing a minute ago: Windows may remember the failure.
The list can get long, so pipe it into findstr to look for one name. And as always, a flush only clears this machine. A router or an ISP resolver can still hand you the old answer until its TTL runs out.
On Windows, PowerShell has Get-DnsClientCache, which shows the same cache as objects you can filter. I stay with ipconfig because it is short and it works the same on every Windows machine I meet, including the old ones.
Further reading: ipconfig reference (Microsoft Learn), On this site: getent hosts shows what your programs really resolve, On this site: DISABLE_RESOLVER makes Nginx Proxy Manager use your own DNS settings