Two things are essential for racing on sailboats.
I have some ideas about this. Years ago I did a little racing in our first boat, a Buccaneer. It's an 18' dinghy, designed for comfy, reasonably safe two-person racing. I crewed a bit. I did really badly. I had a vague idea what was going on, and I had fun. I learned a few things.
The first thing you need for racing is another boat. You can't race by yourself. That's dumb. You need competition. I can't find the source for this, but the adage is
"Two boats in the same bit of water, heading in the same direction, is a race."
It doesn't matter if both skippers agree to it. Because they do, implicitly. Everyone does. You have to assess your progress relative to fixed objects on the shore and moving objects in the water. Therefore. It's a race. Better if the boats are similar. Best if they're identical.

To make it fair, you need to have a race course. And that requires a committee.
The jobs are these (sort of).
-
Set the marks that define the course. (A "W4" in our case.)
-
Signal the start of each race.
-
Identify the order (and maybe the time) for the finishes.
That's almost it. There's safety, of course.
Also, a clear head for what the rules are. And patience. And the ability to make a decision quickly. I lack all of these, but there are many wiser and more experienced folks at the West River Sailing Club. Tons of folks who'd probably forgotten more about racing than I'll ever know.
A regatta's generally five races. Often, they try for three on Saturday and two on Sunday. Depends, of course, on wind and weather. Saturday went well. Sunday, the wind was light, so we tried to head back early. Boats had to be towed.
Here's some video. https://youtu.be/dzkvBTEaWUE
In addition to the folks on the committee boat, we had two other boats in the water. At the windward mark, we had our race support boat "Osprey". And at the "gates" we had Elsie's boat, which I called "LC". The other club boats had problems. The steering had seized on one and the oil pressure alarm was sounding on the other. The third wouldn't start. Sigh.
Volunteers stepped up at the last instant. Boats appeared. I didn't overhear any heated complaints from the racers. So I guess we did okay.
If you want to learn to sail: Here are the Learn to Sail program details.