These are the Best API security Practices to secure exposed APIs from getting hacked
Only expose that which is required
Proper Authentication
Proper Validation of the Data
Implement Proper Rate Limiting
Using WAF to secure against OWASP TOP 10 API attacks
TLS V 1.3 SSL to secure your APIs
Using API Gateways to have proper management of APIs
Use Web Application Firewall