First, you would be better served by asking your question in a forum dedicated to the hardware you're using, at
ST Community[
^].
Next, you make no mention of what pins you connected the LCD on, which LCD it is, what it's requirements are, and there is nothing in the code you posted that shows where you tell the code what pins are for what on the LCD module.
Without that, you're not talking to the LCD. You're just throwing data into nothing.