Is there anyway to store data?

I have to create a simple program that uses a distance sensor, lcd, and a button.

The goal- A subject comes close enough to activate a distance sensor, then starts counting on the lcd screen. when the button is pressed, it will stop counting. I would like the arduino to somehow record the seconds that have passed, without simply resetting and erasing the time.

Is there code I can add to record the seconds in between? I am using the uno board. Would i need to obtain an sd card?

Side note: I am quite new to arduino, and coding in general.

You might want to start by looking into the EEPROM Library

A variable or array if the data does not have to survive a system restart?

Bergbergberg:
I would like the arduino to somehow record the seconds that have passed, without simply resetting and erasing the time.

How much data are we talking about? That is - how many of these do you want to record?

If it's a small number, you can stick it in EEPROM. Of course, you will also need some way to get it out of EEPROM.

Your other options are to use an SD card or other media, or to send a message to something else (eg, a web server, a Java program) via wifi/ethernet/serial that will record the data.

A subject comes close enough to activate a distance sensor, then starts counting on the lcd screen.

How is the subject going to count on the LCD screen?

You really need to start with a clear set of requirements. If the subject causes a distance sensor to report a distance that is below some threshold causes the Arduino to note the time, and to then periodically report the interval since that time on the LCD, that is one thing. If you mean something else, you need to be very clear what you mean.

What time do you need to record? For how long? For what purpose?