The code works in simulator but in my real arduino uno the code is succeeding to compile but the LCD is not displaying anything and it just stay light

Then it sounds like a wiring/power/hardware problem.