I tried to upload this sketch it contains vibration detector with other different detectors, but I have this problem that I don't understand in the void loop section of the vibration sketch

Looking at that, your code will never reach the delay.

Please edit your post, select all code and click the </> button to apply so-called code tags and next save your post. It makes it easier to read, easier to copy and prevents the forum software from incorrect interpretation of the code.