We are all guessing here, You gave us nothing to go on! When is the ride, and how far . fast are you riding now. We have no idea when you have to be ready,m and what challenges we might have in getting your ready.
You do not have to ride a mega distance every day, but you need to ride daily. Rides should be a minimum of one hour in duration. Practice by doing interval training and hill climbs whenever you can.On hills ride up, and coast down, ride up, and coast down multiple times for your ride. Set a specific day, like every sunday, or every wed, and saturday, that you do a longer distance ride.... increasing that distance by 10% or more per week. Add more if you feel comfortable at the current distance. In fact, when I train, I often double the distance.
I am a big believer in doubling, That if you can comfortably ride 5 miles today, double that distance and ride it until it becomes comfortable, and then double it again. You can do that up to 20 to 30 miles. You can not double that next distance. That requires training and smaller steps.
At 25 miles you need to have learned 1) SPINNING AND SHIFTING 2) hydration (about one bottle per hour) and at what distances you need to add energy drinks (unnecessary until you reach 20 or more miles). 3) Energy management... setting a pace . cadence you can maintain over the length of the ride. And, the nutrition needed pre, during, and post race.