Verify that SQL database authentication is enabled/allowed (the firewall is not blocking it) and that you have created a database login and user with the correct credentials.
As @david-browne-microsoft said, if you intend to authenticate using a username and password, you need to remove trustServerCertificate.
Also, if you go to the connection strings sections in the Azure Portal, you will find its connection string; this is also worth a shot
Reference: