RFID Doorlock with servo and i2c lcd

Problem is, i don't know how to implement this piece so it will run continuously within the code.
How should i continue?

Create a function to display text on the LCD. Put the logic for showing one line or two in that function. Call that function everywhere you need to show data on the LCD.