I have a SpaceCraft doing a flyby of a planet and I have 3 3D-viewports in Blender of this scene, but when I render an animation (Ctrl+F12), blender only renders 1 view. I can use a screen capture video recording software (like OBS) to capture all the views in 1 shot, which is easy, but is there an easy way to do this in blender without having to use an external screen capture video recording software? Thank you.
You can use the Multi-View render layer functionality to render from multiple cameras simultaneously. This allows you to add multiple cameras to the scene and render each frame from each camera. Once you have the scene rendered to individual frames you can stitch them together using the compositor - see continuous sequence of frames with multiple cameras with each camera starting at start of animation for an example of rendering the individual frames and making them available to the compositor.
Once you have rendered the images (in my case I rendered a 'Main', 'Side' and 'Top' using Multi-View) you can stitch them together using the Compositor. Here are the nodes I used (a rather rudimentary method of combining and positioning multiple images; the compositor allows for all kinds of possibilities - far more than is appropriate to go into here) :
Each image is scaled and positioned and then combined with a background image (here I've used Lighten for convenience - the starting background should be black; other methods are available to mask out the background if required but that is outside the scope of this answer and depends on your specific requirements).
This produces the following result :
Blend file included - just select scene 'Scene' and Render Animation to create the individual frames, then select 'Scene.001' and Render Animation to perform the compositing to generate the combined frames.
I think Blender assumes that the camera view is the view you want to see when it's rendered. You could try to achieve the three-camera effect by duplicating the spacecraft two more times, creating new paths/keyframes for each, and using one camera to capture all three at once but I think the cleaner way to do it is to render the original animation three times, one for each window.
If you can get your hands on a couple of other computers, you could try copying the file to the other two machines and have each render a different view but, again, the cleaner way to do it is just to render the animation three times.