Using sprintf and nextion display

Why in the world are you using software serial on a Mega. There are 3 extra hardware serial ports on the Mega. Besides the fact that SoftwareSerial will not work on pins 16 and 17.

From the SoftwareSerial reference

Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).