Does your Netlify hosted website show up as insecure when visiting your domain with the www prefix, but it shows up fine without www?
Go to Domain Settings > HTTPS. If you only see yourdomain.com listed there, that’s your problem. It should say
The quickest fix is to 1) delete your domain on Netlify, 2) add your domain again, 3) apply for a new SSL certificate (under the HTTPS tab).
A few minutes later, you should have HTTPS enabled on both your www and non-www domain.
I don’t know why the problem occurs in the first place, but it has happened twice on my end, and this was the solution both times.