Button data is delayed

I am using lcd with I2C module. Button codes and connections are working fine but if i add lcd.begin(); to the code, button datas are getting delayed like adding delay code. Why is this happening and how can i solve this? Thanks for your help.

I solved my problem. The problem was lcd.begin was in the void loop not in void setup.(I dont know how to delete the topic sorry about that)

There are some things you can begin only once.

This is one. :astonished: