You did better than you may realize. A Sunfish, lacking a jib, can be kind of twitchy if you're trying to beat upwind in a strong breeze, it either starves out on speed and steering responsiveness if you pinch it too close, and heels and makes leeway if you bear off to get her moving. Too easy to lose your headway, and kind of volatile getting it back. In a really honking breeze (like yours), may be better to close-reach it rather than close-hauled, a more forgiving point of sail, though your upwind progress will be much slower.
As a beginner, you did the right thing, you hung on to that tiger by the tail downwind, and then waited for a wind shift rather than beating back into a 25-knot wind, which is not the Sunfish's strong point, and will wear you out. This is what the clipper ship captains did in the old days.
But learn to sail comfortably on this thing in 5-15 knots of wind, and the bigger boats you graduate to will be a walk in the park.