Nextion Basic NX4832T035 - Generic 3.5'' HMI 480*320 Touch Display for Arduino Raspberry Pi

the way you have the code is transmitting to the serial monitor…(usb cable) you have to make a uart connection to the screen device and “talk” thru that port