when I try this code with esp32, the power comes to the screen and the background turns to a greyish colour. but the colour or text I want is not happening. what is the specific solution for this?
some solutions I tried : I changed the pins, uninstalled and reinstalled the libraries.
You should make a connection drawing. The picture of the back of the card (screen) is good. It looks like the card is I2C (using SDA and SCL) but your code looks like it is looking for SDI (MOSI, MISO, CS, SCK). Check the documents for the card (screen)
The picture of the breadboard is useless. Make a drawing (easy), or post a picture showing all the wires and pin numbers (not easy).
I did not solder it, because I want it to remain as a prototype for now. so I temporarily hold the holder sent by the manufacturer and I can see the greyish colour on the screen.
This is possible, and probable. The holes (vias) are round, the pins are square. At best the pin-to-via contact is very small. The small contact increases resistance. and Ohm's Law (V = IR) says if voltage remains the same and resistance increases, current decreases.