Try the magnifier symbol up to the right in thsi window. Type Arduino + button box.
Questions like Yours appears almost weakly so there are topics that will be usefull.
That will work, there are some problems with switches that can be set in an "on" position rather than momentary and/ or multiple buttons pressed at the same time so you may need a diode in series with each button. Do you understand why?
Other than that, you need to work through many simpler example projects until you understand the coding sufficiently. You show the buttons - the input part - but what is supposed to happen when they are manipulated?
Railroader:
Try the magnifier symbol up to the right in thsi window. Type Arduino + button box.
Questions like Yours appears almost weakly so there are topics that will be usefull.