There is a "lightning symbol" for a Flash Ready indication at right end of the lower bar in the viewfinder. This symbol goes out when you flash it, and the internal flash will not flash again until it recycles and comes on Ready again. That could take a full couple of seconds to recycle if at a high power level (You probably require the depth of field, but stopping the aperture down to like f/16 would be high power level, and f/4 would be much lower power level, and faster recycle). So it sounds like you are shooting pretty fast without watching for Flash Ready. Also, flashing it too many times too fast at high power could be a damaging overheating issue.
This Flash Ready symbol is #10 on diagram on page 4 of the camera Reference Manual. The Reference Manual is a much larger and much more complete manual than the User Manual, and that PDF manual is free from Nikon at
https://downloadcenter.nikonimglib.com/en/products/471/D3500.html
Using a hot shoe speedlight would recycle Ready faster at the same power. (Yes, it will also take a couple of seconds at highest power, but will have much more power, so it would be at a lower power level, and faster, if at your same current lighting level).