The grandfather problem is a classic time travel problem. Oversimplified a bit, the problem is as follows. If time travel is possible, then a person should be able to go back in time and kill their grandfather before they have any children. But if they do, then they would never exist and thus would not be able to go back in time and kill their grandfather. So, their grandfather would not be killed and thus they would exist and be able to go back in time and kill him. But if they kill him, then they would not exist. And so on. There have been attempts of varying quality to solve this problem and one is to advance the notion of timeline branching. The super simple version is that time is like a river and travelling back in time to change things results in the creation of a new branch of the river, flowing onward in a somewhat different direction.
So, imagine that Sally goes back in time to kill her grandfather. She succeeds and thus creates a new timeline in which he dies. Presumably, she returns to her own timeline and finds that her original grandfather was never killed by her. She might keep trying and from her perspective she would kill him over and over, only to return to find that she never succeeds—but with each trip to the past, she creates another new timeline. For those who prefer their time travel murder free, any change a time traveler made would presumably create a new timeline—and this would include the smallest change. Time travelers would certainly end up creating new timelines in which they (or, more likely, someone like them) exist and would probably keep traveling in time—thus creating branches off the branches. While having so many branches would seem excessive, there are metaphysical concerns for even having one additional timeline branch.
Each extra timeline branch would seem to require the creation of an entire new universe. But even if it created less than that, there would still be the same concern—albeit on a smaller scale. This concern is the origin of the stuff that makes up the new timeline. One solution is to just allow ex-nihilo creation: the new universe just appears out of nothing, mostly duplicating the original with the relevant changes arising from the instigating time travel. Allowing ex-nihilo creation would have many implications beyond time travel and is generally considered sketchy metaphysics. It can, of course, be given a divine twist: God or other supernatural beings are kept busy creating new universes in response to time traveler. This would also involve some interesting problems but is not actually more problematic than having just one universe created by God or other supernatural being(s). As such, if you already accept that God can create a universe out of nothing, then the problem is solved. One could even go for a gold medal in funky metaphysics and endorse pantheism: everything is God and God just “creates” new modes “in” Himself that are the new timelines.
A second solution is that the basic stuff (prime matter or whatever you want) for new timelines already exists and just needs to be formed by whatever it is that does that sort of thing. The easiest answer is to just use whatever originated the first universe to fill the role of creating the new timelines—while there would be the question of why it keeps doing that, it seems sensible that if it can do it once, it can keep doing it.
In terms of the stuff, perhaps there is a finite amount of stuff and eventually time travel would no longer be possible because no new timelines can be created. But an easy fix is to make a clever appeal to the infinite: if there is infinite stuff, then no matter how much stuff is taken to make a new timeline universe, then there would presumably still be infinite stuff left to keep creating new timelines. Infinity to the rescue once again.
One could also use various clever workarounds. For example, maybe solipsism is true and only I exist—so there would be no need to create new timelines. Or perhaps Descartes got it right and it is just him and the evil demon; the demon can just deceive Descartes about time travel without creating anything. But if the evil demon travels in time and changes things, then the problem would still arise. Or maybe there is actually nothing, no self, no reality and no time travel. In that case, there would also be no problem.