Hi @Tiavina_Mik,
It work fine in local and in Heroku, but not in cPanel.
The IP Access List in MongoDB Atlas is already setup as Everywhere:
0.0.0.0/0 (includes your current IP address)
I would recommend going over the following post’s discussion that also mentions cPanel connection attempts and the associated solutions involving port opening from the cPanel end. This is in addition to the fact you are able to connect to the cluster locally and from Heroku. The errors also mentioned in the stack overflow post that the OP posted also looks very similar to the one you have posted here.
If you’re still having issues connecting after attempting any of the suggested solution(s) on that post, please let us know what was attempted and any new errors.
Regards,
Jason