Flat shading vs smooth shading is a decision you make when you author your meshes. Godot’s primitive shapes are always smooth shaded.
If you want to continue using primitive shapes, then you will have to write a script that converts them to use flat shading. However, I strongly recommend instead creating your meshes in a tool that is made for creating meshes (like Blender) instead. Blender will allow you to easily switch between flat shading and smooth shading.