I use the library yzheka-m / nokia-5510-display. The screen runs for 15 seconds, then turns off and turns on again. It looks like arduino is rebooting.
Looks like a hardware problem. Are you sure that the power is enough? Maybe the display performs power consumption burst at some moment which browns out the power of the main MCU causing it to reboot.
With power and connection everything is fine. I uploaded a sketch from the Internet to Arduino and it worked.