WaveShare 4.2" - Arduino Uno Problems

Connecting this e-paper display to 5V supply is a very bad idea; it will not survive long.

Connecting data lines of this e-paper display to 5V IO pins is also a bad idea; it will shorten its lifetime.

Use at least series resistors for data lines to connect to 5V Arduino data pins.

You did not post a link to the display you bought, so we don't know if you use the display with the panel mounted on the Waveshare board, or the panel used with the Waveshare e-paper HAT, or …

Note that the Waveshare demo code and GxEPD use different connections per default.