Misgendering is common for trans people, but cisgender people who appear to be another gender and/or have unisex names can also be misgendered.
It will be likely be awkward for you and the other person when you called them “he” and “a guy” just because they had a buzz cut.
Many people don’t like being asked what their pronouns are. For trans people, it can seem like being asked if they’re trans, which can be a problem, especially if they’re stealth. You can also ask for their name or gender directly.
At all costs, avoid using phrases like “guys, gals and nonbinary pals” “girls, gays and theys” since it reduces trans and nonbinary down to gender and pronouns.
Apologizing repeatedly or talking about how you’re trying to remember your friends pronouns but you have a terrible memory and you’re so, so sorry will only make it awkward for the both of you. It most likely won’t be the first or last time they’ve misgendered. Keep things simple and short. [3] X Research source
Try not to make a big deal out of this. Some people might have forgotten you misgendered them or brushed it off. Some people might remember. Either way, it’s important to apologize.