Control 68 solenoid valves with 68 relay but it fails when they connected with valves

The valves are grounded. They would not work if they had no ground connection. Your diagram shows that they are grounded. But they are grounded to the 30V circuit ground.

If the 5V and 30V supplies had a common ground, and there were no flyback diodes for the solenoids, then the reverse voltage/current from the solenoids could reach the Arduino through that common ground and cause resets or even damage the Arduino. But there is no common ground, and it is not needed. Therefore that may not be the reason why the arduino is resetting. There may be some other reason, perhaps radio interference or induction between unconnected cables.

Capacitors across the solenoid terminals (in parallel with the flyback diodes) may help to suppress radio interference. 0.1uF ceramic or polystyrene caps, rated for at least 30V, could be suitable.

Can I use 1N4148 diodes instead of 1N4000X, I find it's more suitable for high-frequency switch from the relay. It says the carrying current is 200mA

No, I would not advise that. 1N4148 is a small signal diode, not meant for heavy duties like this. 1N4148 can run at higher frequencies than 1N000X, but both diodes can run at much, much higher frequencies than any relay.

No, best to use the 1N400X like I recommended.

Can you explain what is common ground? For the valves it only connected to the '+'&'-' of the bench power supply, the 'GND' is not connected now.

Can I use M1F diode to replace this. This is only one I can find now in my city.

Your 30V PSU and your 5V PSU both have grounds. But they are separate. If you connected the ground from the 30V PSU to the ground of the 5V PSU, that would be a common ground. But you don't want or need to to that in your circuit.

Yes, they would be OK
However it is a small SMD part

OK, thank you. I checked that all the cable connection. It still has the problem so probably the reason is still the diodes

Thanks!

bug video.zip (2.0 MB)

The Arduino reset like this.

They are tiny parts without leads. Not like the 1N00x