If I were you I would start again. Accept this attempt as a learning experience.
Open up a new sketch and name it something descriptive, like 'button'. In this new sketch you will only code the button, nothing else. Once finished you will have a working button with appropriate code which you can reuse in any project.
Look carefully at the diagram presented in the posts above. The typical way to wire a button it with one side to the buttonPin and the other side to ground. When you press your button it will ground the pin. There is, however, a problem. The pin, when the button is not pushed is floating. this means the pin is not connected to any known voltage and therefore it will wander wherever it pleases, occasionally triggering even when the button is not pushed. The solution is to attach a resistor to pull it up to the VCC. You can do this in code by setting the pin to INPUT_PULLUP which will activate the internal pullup resistor.
Now you have the right hardware, in your code do the standard stuff: declare the pins with a good name like buttonPin, set pinmode buttonPin to INPUT_PULLUP. Now you need to detect the 'edge'. This is the moment when the button 'becomes' pressed, examples here State Change Detection (Edge Detection) for pushbuttons | Arduino. You do this by declaring the buttonState globally and then looking for a change in the state in loop. This is an important concept because mostly, with buttons, you want to detect a single push and not waste processor time detecting all the time the button is pushed.
If you get this concept then you can start to think about debouncing. The code above uses a dirty delay which is blocking code and should be avoided. Here is an example that avoids this problem: Debounce | Arduino
Once you have all that sorted then you want to think about putting it all into a function. You could call this function buttonPoll or something nice like that. When called in loop it can check the button/s each time through and see if there is a press. If there is it can change the RelayState. This function is useful because it will be somewhat 'encapsulated' so can be used in other code without messing stuff up.
Use the serial monitor to debug. It can print variables and you can even have it print button pressed and button released.
it seems complex but it is actually a series of quite simple concepts (once you get your mind round them). You next open a sketch and call it relays!....
Concepts:
loop should be fast and with non-blocking code
pins can't be left floating if you need to know what state they are in
Millis timing (blink without delay example in ide)
state change and edge detection
functions and encapsulated code
serial debugging
Always coding in discrete, small, well named sketches with an iterative approach. Save often, give new names to each iteration, always have a last working code and a current working-on code.