I'm pretty new to this so I have no clue what I did wrong.
My LCD is only showing boxes on the top row when I turn on the Arduino.
I've searched the internet a bit but couldn't find anything that helped.
The code I'm currently using is below as well as a picture of the LCD.
Also, sorry if I'm doing this wrong.
I tried your original code and it works fine on my Uno and 16x2 LCD.
Have you tried adjusting the contrast pot?
The correct way to wire the contrast pot is to wire one end of the pot to ground and the wiper to pin 3. The other end of the pot not connected or connected to the wiper. The long standing advice that the pot is wired to ground, Vcc and pin 3 is wrong. It is an error perpetuated over many years that begs correction. In your case, just remove the green jumper between 5V and the pot.