This is pretty simple for the basic case where you simply want to replace an existing audio track.
The Video file will need to be readable by Cubase and must contain an audio track (even it if is all silence).
In your Cubase project (I usually start with a New empty one), select File->Import->Import Video
During import Cubase may ask if you want to set the Project to the same frame rate and audio sample rate - to which you should say yes.
Cubase will create a Video track and an Audio track for you. Mute the audio track.
Write you music/narration as normal in Cubase.
When you have your final mix you Export Mixdown per usual but set the right and left locators to the the exact same length as the video track. Save that export file somewhere.
When that’s done your last step is in the File Menu, look for “Replace Audio in Video file”. Select the original file, select your mix down file, push go.
The important thing is that Cubase can only replace the audio track if a) one exists in the video file and b) it is the exact same length, sample rate, etc. Cubase cannot reformat the file on its own and for that you would need to use some sort of video editing program.