Maybe we need to know which flash? The internal flash is not supposed to open and fire if a hot shoe flash is attached. If it is a flash made recently "for Nikon", it should work on the hot shoe. The fact that it does not must mean it is off camera, or it is some other brand of manual flash that the camera cannot identify as being present, and the communication between flash and camera doesn't work. Or, an older flash made for Nikon film cameras is probably the same communication problem.
There are ifs and buts that are unknown without knowing which flash, but a less compatible manual flash should still work though, this way (most of them):
For external or hot shoe flash, use camera modes A, S, P, or M. Then in those modes (another flash present or not), we open the internal flash when we want to use it, and leave it shut when we want it shut (like when using a hot shoe flash). The internal flash does not automatically open in modes A, S, P, M.
In camera mode Auto, the internal flash opens the door itself when it thinks flash is necessary. And if it cannot recognize the other flash communication, it would open.
Camera mode A or M are popular for indoor flash, but mode P is fully auto ambient exposure like Auto, but the difference is that A, S, P or M does not select Auto White Balance or Auto ISO. If we want those, we have to turn them on (but they are automatic in Auto mode).
Except a manual flash CANNOT work with Auto ISO, it cannot react to changing ISO, and so Auto ISO must be turned off. If the camera is able to recognize a manual flash, it will turn Auto ISO off.
Likewise Picture control, like Vivid or Landscape, etc, if you want them, you have to select them in the camera menu. Only Auto is fully automatic everything, including the internal flash.