The Cubase MIDI Device is only used as a sort of configuration tool for enhancing the operation of a MIDI device.
For the input, you can select "All MIDI Inputs" or UR-44 (the "All..." includes the UR-44 MIDI In) and for the output you would choose UR-44. This is of course contingent on you having your XP-50 connected to the MIDI In/Out of the UR-44.
This now enables you to transmit a MIDI message from your XP-50 to the UR-44 to Cubase, and you can also now send MIDI message from Cubase to the UR-44 to the XP-50. If you have a MIDI Track for this purpose, you now need to use the Local Off functionality on the XP-50. Local On is for when no router (e.g. Cubase) is used/needed to control the MIDI messages.
You can now create one or more Instrument Tracks that you would set to UR-44 for MIDI In and of course the output routing on such tracks would be the VST instrument itself.
If an Instrument Track works, but a MIDI Track does not seem to play anything on the XP-50, you very likely have to configure the MIDI Channels on that track AND XP-50. I do no know how much you understand about MIDI, but MIDI Channels effectively divides the MIDI Port/cable into 16 virtual mini cables.
So whichever MIDI Channel you select in Cubase, the XP-50 has to be listening on, in order for it to properly react to MIDI messages.
Even though the MIDI Ports come in pairs (In/Out) you need to consider them as separate pipes. This is because one cable is not bi-directional, like say a USB cable.
So again, what you send from your XP-50, is transmitted to Cubase, and it in turn re-routes the messages depending on what is selected and how tracks and other items are configured inside of Cubase.
"Remember that we live only in the present, in this fleeting instant; all the rest of our life is either past and gone, or not yet revealed."