Are you asking for support? WordPress is secure and a lot of responsibility is on WordPress’ side, but it is also on the side of the webmaster. The webmaster needs to ensure all dependencies and core is kept up to date, and that secure passwords are used. That will be enough to prevent a hack, however there are ways to improve security as well: https://codex.ww.wp.xz.cn/Hardening_WordPress
If you are looking for support with your hacked issue, you need to start working your way through these resources: