I had the same trouble. If it’s working in the admin section, then generally cache / performance optimisations are switched off for admin so that any changes can be seen instantly. If it’s not displaying when logged out check the developer console for messages. In my case I had to switch off the ‘Defer Render-blocking JS’ as scripts were not running with correct dependancies.
Hope this helps
ps if this doesn’t work just temporarily diasble cache / performance optimisations to see if that’s the cause and then work on each option until you find out whats wrong.