Hydration is a big part of your body's ability to cool itself, but by no means all. It could be it was just too hot - for your level of acclimation, for your level of exertion, for your personal heat tolerance.

It's got warm all of a sudden in our part of the world. It takes a couple of weeks of consistent exercise in the heat to get acclimated.

Did you weigh yourself before and after? Do try that.

If it turns out you really weren't drinking enough, a trick I used to use is to take a sip whenever I thought about water. Outside on a bicycle, you don't go far without passing a fire hydrant, a pond, a lawn sprinkler ... crossing a river ... being passed by a truck for a pool service or water softener company ...

(Eventually that trick led to my drinking too much and I abandoned it, but to me it was a good way to learn.) Alternately, if your watch or bike computer has timed alarms, you could set it to go off every 15 or 20 minutes to remind you to drink.