so basically you need a midi cable from the Thomann interface (out) to the DM5 (in)
you also need to find a way to input midi data into cubase, you can use a keyboard or just write the notes in by hand (if that makes sense?)
To hear the output from the DM5 then you would probably be best plugging the DM5 audio outputs into a couple of spare channels on the UR824 - these will need tracks assigning and input monitor switched on.
Luckily cubase has a simple way to automatically do this - called ‘External Instruments’ - you still need to make physical/cable connections.
Watch this and see if it makes sense: