If you build enough renewables, then there comes a point when at times you're generating more than is needed immediately. That surplus electricity can be used to make hydrogen gas by electrolysing water. The gas can be stored indefinitely and burned to generate electricity when needed. So with enough renewables, no fossil fuels are needed.