Another thought - the fact that you successfully relit the pilot light doesn't mean that the flame won't go out again.
The fact that it went out suggests that the real cause is something else- such as the thermocouple which holds the gas valve slightly open to keep the pilot flame light is failing.
Changing the thermocouple is very simple. Having a spare on hand as previously mentioned is a great idea.
But you have not done full troubleshooting just by relighting. That's like getting your stalled car out of traffic by push starting it :-)
About 20 years ago we had a furnace problem where gas supply went away. Neighbors had no issues. It was a failed meter which wouldn't flow gas. Utility company came out fairly quickly and replaced the meter. That was a flavor of failure I couldn't fix myself.