Below depicts a FIFO buffer:
So the buffer is there for when the speed of data written into the FIFO buffer is faster than the data read.
But I don't understand one thing. Wouldn't eventually all the free buffers of the FIFO buffer run out after certain amount of time? Because writing speed is faster than the read speed.
And if it will stagnate, what is the purpose of using it?

Given there is no implementation to discuss, this is all theoretical. So yes, depending on the resources and the rates of production and consumption, it is possible the buffer resources will be exhausted.
The results of an exhausted buffer depend on the implementation and possibly settings there.
Buffering won't make consumption faster, but it allows consumers to process the incoming data less urgently, allowing for bursts of production and/or consumption.