Most probably the problem is plugin or theme conflict.
Plugins that may have conflict with RankMath plugin
- WordFence
- W3 All-in-One Cache
Use Health Check & Troubleshooting plugin built by WordPress community to figure out which theme or plugin is causing this issue.