The “not secure” message normally indicates that attempting to connect to a website that is not using SSH (i.e., is not using “https” to secure the connection) or something is seriously wrong with the SSH Certificates / Chain of Trust.
Anyway, given your recent history of suspected malware concerns, pop-ups and “dodgy websites” that you have described, here are a couple of suggestions that will go a long way to protecting you from on-line troubles.
1) From the App Store, find and install 1Blocker. It’s an add-on for Safari - and it’s now free; whilst it might look a little daunting at first, it is one of the very best Ad-blockers for iOS that is currently available. You don’t need to pay for the optional subscription. Another benefit is that it will make Safari much faster in downloading content.
2) Manually change your DNS settings to to the Quad9 Recursive DNS Service (Primary - 9.9.9.9, Secondary - 149.112.112.112). If don’t know what this means for you, suffice to say that using this DNS provider will prevent the majority of access - and malicious redirects - to dodgy websites.
I hope you’ll find this helpful in improving your internet experience.