When you open a port with UDP Open on your computer, you're reserving that port locally on your computer. Subsequently, when you call UDP Write, you are specifying the port on the remote device to which you want to send data (your computer doesn't care what port that is).
Conversely, if your device is sending data to your computer, your device has a port open through which to send data. The data is delivered to a particular port on your computer (that port does not have to be the same port from which it was sent).
So to answer your question, no, you do not have to open the same port number on your computer. However, if your device wishes to send data to a port number on your computer, and that port number also happens to match the port number in use on the
device, then yes, the port numbers will match...but that's only because your device required them to.