If you sell your time you should set up retainer agreements. That’s similar to what f/t employees do.
Better, charge based on business value. With my customers I ask them to list their pain points and issues and then assign priorities and value to those. We both know what the work is worth. Getting it done faster than expected usually means the work is more valuable.
We all use this model every day. When I eat a restaurant I pay for the meal, not the time. When I pay someone to mow my lawn I expect a flat price based on the work, not to pay by the hour.
If you and your customer working together can’t define the tasks, put them in order, and assign values to them then you’re not doing the necessary requirements gathering and analysis. That’s how so many freelancer engagements end up in failure, disappointment, anger, and legal mediation.