CyberPanel is a control panel; unless it’s compromised, it’s likely not related to the hacking issue.
To secure a WordPress website from the web server side, you can protect the wp-login.php and wp-admin pages using a static context. ReCAPTCHA and throttling are also supported by the web server. Some users may also consider implementing OWASP ModSecurity and CrowdSec to enhance general web application security.