It is because the URL is a localhost URL. localhost is a server, that runs on your computer. Therefore, Unity does not have access to it. To make Unity have access to your WebGL game, you need to host your server. You could either do it two ways: Host it yourself, or have a website host it for you. Hosting it yourself means that you need to buy some servers, and that isn’t the easiest way. So you could a website to host it for you (like AWS), and then send the URL (you would need to buy a domain).
I don’t think Unity Learn wants you to go through all of this, so can you send me the link to the Unity Learn page, so I can make sense of what they’re saying?
Hope this helps.
hey I'm having a similar problem I'm trying to complete the mod the cube challenge in unity learn its part of the mission checkpoint for the junior programmer create with code 1 course on unity learn
– Gaius