This question already has an answer here:
In Star Wars: The Last Jedi
It's a major plot point that the Resistance must find some way to escape the First Order before their ships run out of fuel.
In space, there is very little resistance to motion, so once something starts moving, it tends to stay moving. This is why real life spacecraft barely need to burn fuel once in orbit of something. When
the rebel ships are being chased by the First Order, they appear to stay the same distance from the ships after initially moving out of effective range.
The only way this makes sense with both distance and fuel burning is if they are accelerating at the same rate. At some point I believe someone says the Resistance ships are faster (I am assuming this refers to acceleration, because neither fleet should have a terminal velocity other than the speed of light), so I suppose they were only accelerating as fast as the First Order to save fuel, and had determined they were not sufficiently fast to totally outrun the First Order.
However, I find it hard to believe that two fleets could accelerate, near the maximum capacity of one of them, for at least 18 hours and not go into hyperspace. These are ships that can traverse systems in minutes if they choose, and I find it equally hard to believe that the First Order would only use a fraction of their available power in pursuing the rebels. How then were the rebels able to run out of fuel without changing their velocity significantly?