There are circuits in the GFCI that determine if it should be allowed to pass power to the outlets and all downstream outlets. These can be damaged.
However, before you replace it, press the reset button (sometimes in red; other times in outlet color and not easily seen). If it snaps in you are good to go).
There is also a test button that should be checked/pressed monthly.
It should pop the GFCI reset button; just press it back in after the test.
Oh, I have also seen plugs that are oddly shaped that can press on the test button and cause the outlet to malfunction (not work).
Lou and Laura with Bella - German Short Hair Pointer
2008 GMC Sierra 2500HD Crewcab SB Allison Duramax
2010 Flagstaff 8526RLWS - Superglide 3300
HAM CALLSIGN - KC3FFW