You may find that you also need some valve or pump.
You can power the Uno from 12V provided that your relay is a 12V relay. But if you use a 5V relay, there is danger of burning the Uno's regulator because it will need to supply 5V to the relay, which will require a high current. In that case, you must use 2x power supplies (5V + 12V) or get a MOSFET module to replace the relay.
Yes, I am also using a motor(3.7-6v) and powering it with a separate dc 12v battery(Trough buck converter). I am using 5V relay through 5v mobile charger.
If your pump is 5V compatible, why are you using 12V battery and buck converter? Why not use another 5V PSU?
I do not think we can help you fix the hanging problem without knowing the specifications of these components and how they are connected. Please post your schematic diagram.
Your diagrams are clearly incomplete, many component's terminals are not connected, so it is difficult to answer that question accurately.
The diode you indicated with an arrow is the flyback diode for the relay's coil. The flyback diode I mentioned is for the pump.
Assuming your diagram is accurate in this respect, a flyback diode for the pump may not be required because the pump has it's own power supply which does not have a common ground with the rest of the circuit. However, because of your hanging problem, it may be worth testing to see if a flyback diode for the pump is helpful. I cannot say this for sure because your description of the hanging problem is also incomplete.