There's no one fixed answer.
In racing, there are categories, around 5 normally. A category 5 racer is someone who is entering their first couple races, possibly has a road bike though its not unknown for MTBs to be used.
Once you have some race completions, then you can be placed in the next category. Depending on the body organising races, you may need to achieve a top 3 place in 2 of your last 5 races, or something similar.
To win or place, you have to finish the race course faster than most of the rest of the competitors (in your category). Its common for several categories to run at the same time, to get the best use of daylight.
If the race is a 20 minute sprint/crit, then the speeds needed will be higher than a 10 hour/200 km endurance race.
If you want to participate in a race, just do it - is that simple.
If you want to win a race, you have to enter, and if you've never raced before then simply crossing the START line is an achievement. Aim to cross the Finish line too, even if you're dead-last its still better than a DNF or a DNS/scratch.
Since you really seem to be asking for a target number, I'd estimate that a flat ride of 24 km should take you no more than 1 hour in neutral winds, ergo an average speed of 24 km/h (15 mph) would be a good target.
If you need a rest in that hour, you're pushing too hard and need to work on your endurance. If you're wrecked after that hour's effort then that's okay, aim for shorter races. Also, that same 24km/h effort will get you at least 20% more, or 30+km/h in a bunch. That's a weird but neat feeling.
For more local advise, try searching for cycle races near you. I see that https://localraces.com/ returns about 4 relevant clubs. Just call and ask about events or group rides.
If you've never ridden in a group, its probably wise to get some practice in before trying a race. Being able to ride in a paceline, smoothly and safely is a skill in itself. This is another area where a club can be useful.