CSS not loaded when omitting www. part of URL

This can happen for several reasons – in your case, it looks like you are using a caching plugin that only recognizes www links. I suspect if you turned off caching you would not have that problem, but then you’d lose the benefits of caching.

It’s best practice (with or without caching) to add redirects so only the www or non-www version of your website can be seen. You can add a line or two in your .htaccess file to enforce whichever you prefer – which in your case is probably www.

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^(.*)$ [NC]
RewriteRule ^(.*)$ https://www.%1/$1 [R=301,L]

These 3 lines say, if someone tries to access your site without “www.” in the URL, the server should always redirect them to the “www.” version of that URL. This helps search engines know which version of your site you want indexed, and if you use SEO plugins that add canonical URLs, will help reinforce the 1 and only 1 version of each page that should be recognized.