There are two options included in the game for managing these sorts of situations. The first is that you can pause production - this is fiddly, but allows for some control early on and provides some opportunity to understand the value of the second option before it becomes available.
The second is to use the reserve sliders that are enabled by upgraded storage cells, which set aside an amount that can't be used by production. At some point, I'd like to add a shortcut for setting reserves based on a build action or research item's cost, but that's low on the priority list for now.
Hope that helps!