How to use button to alter code and display on LCD

Hi i am aware that what i am asking is like a bunch of problems. but hear me out. i am basically working on a timing type of device that would use the RTC 1307 to keep track of time and on demand(push of a button) it would show that time on the lcd.

NOTE: i am just saying this as an example but i really want to create cases and modes with which i plan to alter the Arduino's code with a push of a button(for example show time. create alarms. show countdowns. show time left etc... and to actually activate a trigger or act on that alteration and remember it.. you get the idea.).

Now i understand this is a pretty basic and one of the most created projects. but i honestly don't know what to search for. after days of searching all i was able to find was that there is something called boolean and you some how configure that to change the state of the button and then you create functions and cases where when you specify the trigger of the case that function will be carried. but i am not sure if i even understand how it works. could someone guide me to the right path for example what i need to learn in order to code that and create as many functions and cases i want.
Thanks.

Given where you seem to start from I would strongly suggest to put this project to the side and focus on learning C and the Basics of C++

Once this is mastered then try more ambitious projects...

You could also try to work your way through using classes to abstract your button like the OneButton library —> see the examples but you’ll quickly hit the limits of your knowledge and that will be frustrating...

Building on solid foundation is always best...

100% agreed!!
Yes i did consider that. as a matter of fact i have been watching c++ tutorials all day today. although it is really scary to go from no coding at all(only html a little bit) to learning c++ but i'll manage to sit through it i guess. but a part of me want to take a shortcut it's just been months since i am trying to build this project (my real project btw is a fully automatic and real time based incubator. ) i have figured most of it out the only part left is the easy user interface( i guess that's the main part) XD.. thanks for the tip tho. i am new to this forum so i really don't know how to mention reply someone.

I would love to hear some more suggestions if their is a to the point tutorial out there.