In all honesty , web hosting security is a constant work. Always update your plugins and CMS, you shouldn't always use weak passwords like “admin123” which is very common. SSL certificate is also very important. I also like enabling 2FA on my hosting accounts.
Secure web hosting requires updated software, strong passwords with multi-factor authentication. You also need to use HTTPS, and do regular offsite backups, firewalls, monitoring, malware scanning, secure configurations, and input validation. These steps helps to prevent attacks like SQL injection and XSS.