If you encountered an error while rendering the video please try following solutions:
If you're trying to render from straight Premiere, try to hit the "Queue" button instead of "Export" and try to render the project from within Media Encoder.
Try to turn off GPU. A lot of the times render errors are somehow related to hardware limits.
1. Inside Premiere Project
2. Inside Media Encoder if you're exporting via "Queue" button
Do not forget to turn the GPU rendering back on after the final render.
If you're exporting to H264 try to switch to "Software Encoding" in the format preferences like this:
Try a different video format and when render is sucesful re-encode into desired codec. You can drag and drop any video file into Media Encoder and export it to desired format.
For this to work without losing quality make sure to choose a quality format for example QuickTime / Apple ProRes 444. Otherwise you may loose some quality.