It is important you should reset all settings. There might be chances that your network settings are not proper. In this situation, you have to assure that the ports are not blocked or you can disable the application to sign in to your account. They do not check the specifications of the software and it might have been blocking the network ports of iMessages to provide you the required security. Most of the individuals make the mistake of downloading the 3rd party software like VPN, firewall or security.
Now you can sign in again with the Apple ID you used for the Apple ID account page and the issue will be resolved. Select messages >Send & Receive and click on the iMessage account so you can sign out from the previous account. In case that it sign incorrectly you have to follow the given instructions. You should access the Apple ID account page and enter the ID and password you were using on the iMessage.
Make sure that the ID and password you are entering is correct. The first thing you have to do is to check your Apple ID.