Nextion with 4 motors

I face a problem, please give me some suggestion I control 4 motors and nextion display use arduino mega.
After 2~4 hours, both arduino and nextion hang. I have to reset the arduino.

Hello
Welcome to the Arduino fora.
Before you do anything else please read General guidance
And
How to use this forum

Thank you.