How do I create a command that runs once?

Hi! I know this is a really simple question, but I can't actually find anywhere telling me how to do this, and I'm a bit lost. Please be nice, this is my first time making a datapack.

Basically, I want to run a command to create an objective (specifically scoreboard objectives add timer dummy) but I don't know how to make it only run once? Sorry, I know this is likely a dumb question but I can't find a straightforward answer anywhere.

Continue to help post