@hanyalbaghdady if your flash does not stay closed, it is possible that this is caused by a bad latch. Turn your camera around and look at the flash housing. Next to the hole that catches the hook in the body should be a very small Allen screw. Gently try to turn it to adjust the latch. If that does not work or if there are other issues. Check the Assemble/Disassemble part of the SM [document|31680] for your camera. Let us know what you find.
If you need to change the hook, check something like [https://www.youtube.com/watch?v=e39dk_D9oaw|this video] (not your exact model but close enough to get an idea)