How to disable HSTS (or create certificate without DNS pointing to the site)

I am moving from one server to another and would like to test the sites before i switcha DNS records, but can’t do that because of HSTS. I can’t install the LE SSL either as the domain is not pointed to the new server. What would be solution here? How to disable HSTS? Or how to create a certificate that would allow to connect to the site?

It seems to me I managed to issue self-hosted ssl, just by clicking on Issue. And i can access the site in incognito mode. So this is not anymore an issue