74HC08 Quad 2 input and gate Not working
CMOS inputs have protection diodes to ground and supply pins. In essence you are powering the chip via the inputs that are connected to 5V.

Also the inputs must be either GND or 5V, it must not be disconnected. A simple pushbutton is normally disconnected and you connect by pushing, so it is not enough. At least you need a resistor for each pushbutton to set the voltage while button does not connect.

Worst thing is you have connected some of the outputs to supply voltages. Unused outputs must be left unconnected. The chip might drive too much current and break. So disconnect them immediately.