iMessage will use Apple’s servers to send a text message from one iPhone to another instead of using SMS. Before you switch to another phone, you need to deactivate iMessage on your iPhone or contact Apple to do it if you no longer have access to that iPhone such as trading it in or it get’s lost or stolen.
If it’s not deactivated and you switched to a another phone, when someone on an iPhone texts you it will see in Apple’s database that your phone is an iPhone and iMessage you instead of SMS you. The person who’s texting you thinks they messaged you but you never get it and goes into a black hole. The person messaging you might be sending you something important or think you’re ignoring them.
A fix to this problem would be if you switch to different phone the carriers should automatically tell Apple that phone number has been deactivated or switched to a different phone. Another good way would be for Apple to ping the phone and make sure it’s still activated.