As you are using html code for this, Wix won’t provide support for help with third party provided code, as stated in the pages here.
https://support.wix.com/en/article/using-iframes-to-display-visible-content-on-your-site
https://support.wix.com/en/article/embedding-custom-code-to-your-site
Have a look here at this previous forum post about using a preloader as it gives you a good working example and is in the same style with using html in a custom new tool in Tracking and Analytics.
https://www.wix.com/corvid/forum/community-discussion/real-preloader-on-a-wix-website
Or outside websites here.
https://www.vorbly.com/Vorbly-Code/WIX-CODE-HTML-PRELOADER
https://futurevisionweb.wixsite.com/futurecodemain/preloader-tool
Finally, with your last line here…
So for that, the code is working, but i have a problem, when the site has finished loading, all elements like, pictures, menu… are completely blurred…
This can mean that the page is not fully loaded yet and the images are simply shown blurred (like low res samples) until the page has fully loaded.
Note that the larger your used images are, then the longer it will take for them all to load.
As stated here.
https://support.wix.com/en/article/request-disable-the-loading-of-low-resolution-images-before-the-high-resolution-ones
https://support.wix.com/en/article/setting-the-image-quality-for-wix-pro-gallery-images
https://support.wix.com/en/article/media-and-site-performance