Nodemcu v3 connected in 2 pcf8574 with 8relays and push button

I'm a newbie with this c++ programming. I just copy this codes from youtube. To be honest, I don't really understand this i2c codes and I appreciate it if you teach me.

The 8 relays is connected in the PCF8574(0x24) and my push buttons is attached on the other PCF8574(0x21).