Pop-up / Modal for first time visitor, Flicker issue

Hi there,

I have a modal that is showing only for first time visitor. I added a javascript code in the head of every page. The modal is working well but I notice that there is a glitch, the page flickers for a few millisecond when loading.

Anyone able to help and point me to the right direction please?

https://preview.webflow.com/preview/mammoth-a-design-and-innovation-company?utm_medium=preview_link&utm_source=designer&utm_content=mammoth-a-design-and-innovation-company&preview=5eb250725c7e134e8619684e3586909c&mode=preview

It’s noticeable on the live site. https://www.mammoth.design/