To export a sequence as an H.264 file (the most popular option), make sure the Timeline panel is active and choose File > Export > Media or press Control+M (Windows) or Command+M (macOS).
In the Export Settings dialog box, choose Format: H.264 and Preset:Match Source – High Bitrate. (Note: In order to save as an mp4 you will need to make sure you select the H.264 format and not MPEG4)
To choose a filename and location, click the blue filename to open the Save As dialog box. Use this to choose an export location and a name for your new file, and then click Save.
When you’re happy with your settings, click Export. The new video file will be created, ready to share with the world.