How to change the mail server port connection?

The internet provider in my country is keeping their 25 port closed due to spam. We’re using port 587. But the mail server is trying to connect via port 25. How do I change it?

This might help Setup External SMTP on Google Cloud Platform (GCP) - CyberPanel