How to make Arduino Code read/detect information

Hey.

Its been a long time since I last worked with Arduino.
But for training I want to make a game, where the program randomly lights up 4 LEDs in a certain pattern, that you need to re-create by pressing buttons that are connected to the LEDs. Simple game, also called "Simon".
But I don't know, how the code is supposed to remember the random pattern (does it do it automatically or do I need to add something specific to make it remember it?)
Also, if I press the buttons, how do i make the program read the received information from the button and make it detect the information, on wether it matches with the pattern of the LEDs.

I have literally no idea and I'm a noob so sorry for asking.
Thank you for your time

It sounds like you need to start with the very basics of Arduino programming by studying several of the examples that come with the Arduino IDE. Most of the techniques you will require for your project will be in one or other of the examples.

how the code is supposed to remember the random pattern (does it do it automatically or do I need to add something specific to make it remember it?)

There is no code unless you create it, and it is up to you to create the code to do everything you want your project to do. Nothing happens unless you add code to make it happen.

...R

Start here.