Fail2ban can significantly mitigate brute force attacks by creating rules that automatically alter your firewall configuration to ban specific IPs after a certain number of unsuccessful login attempts. This will allow your server to harden itself against these access attempts without intervention from you.
How To Protect an Nginx Server with Fail2Ban on Rocky Linux 9
How To Protect an Nginx Server with Fail2Ban on Rocky Linux 8
How To Protect an Nginx Server with Fail2Ban on Ubuntu 22.04
How To Protect an Nginx Server with Fail2Ban on Ubuntu 20.04
How To Protect an Nginx Server with Fail2Ban on Ubuntu 14.04