Wait 24 hours. 48 hours. 72 hours. Wait, particularly if you’re texting late at night when your decision-making ability is spent for the day.
See if the emotions associated with texting him ease. Very often, the desperation will disappear and you’ll realize you never needed to text him in the first place.
You were okay all along.