I'm a beginner, I've only been surfing ~15 times, and I'm making the progression from white wash to green waves. Today I was surfing for the first time in an actual lineup instead of going where no one else is. I read up on surfing etiquette before heading out, but I messed up SO bad today that the whole lineup moved away from me.
I kept paddling out after surfing in, and I thought the coast was clear, but right as I was sure no one was coming, some local on a shortboard was headed right at me and had to swerve out of his way. I felt so bad and really wanted to apologize but I just got dirty looks. No one said anything to me or threatened to beat me up (I'm a girl?) but I know even though they would have been liable for hitting me, I shouldn't have been in their ways.

What are you supposed to do in that kind of situation? Cheers in advance!