Error message: Trying to connect 16 x 2 lcd to arduino nano

OK, that does not tell too much. Usually it gives a hint about what is wrong.

Next step is to get rid of the windows store version and install the normal IDE (current version 1.8.9) from https://www.arduino.cc/download_handler.php?f=/arduino-1.8.9-windows.exe.

The windows store version can exhibit strange behaviour and this might be part of it.

Question: is COM3 indeed the port that shows up in device manager when you connect the board to the PC?