How many generations of stars can be formed in the Stelliferous Era? As in general case, stars are formed from nebula which in some case itself is the result of a supernova.
Also stars need hydrogen to become a star (to do nuclear fusion), but stars consume hydrogen in their lifecycle. Thus, less and less hydrogen is left for the future generation and more heavy elements take that place.
How many generation of stars can be formed until there is no more enough hydrogen left to create new stars?
One can make a theoretical upper bound by considering the most short-lived star possible $\tau_{short}$, and a large supply of initial hydrogen $M_H$. Then one could calculate the fraction hydrogen that is recycled $r$ after the star ends (with a supernova), and get a total number of generations as $ \log (M_{star}/M_H)/\log(r)$. If one uses the solar-mass $r\approx 0.5$ and a galaxy mass of gas $M_H=10^{10}M_\odot$ one could get 33 generations.
One could of course try tweaking this by using heavier stars that recycle better yet are not affected by the growing metallicity of the medium, but it would be rather wasted effort: it is not a realistic model.
The overlap between generations is growing: stars are made today from mixed gas recycled from all previous generations. They also last very different lengths of time depending on mass, so the gas reservoir does not conveniently fill up for the next generation to be created, but rather is topped up while star formation is ongoing. So speaking of generations becomes less and less useful, and instead it makes sense to mainly speak of when a star formed or how much metals it had at the start due to a highly evolved gas reservoir.
One can simulate star formation and recycling by using models of each, but it quickly turns rather complex and worse, dependent on assumptions about how much intra-cluster gas will fall in the future, something that is weakly constrained. Current trends in star formation suggest that we are close to peak star number and that peak star formation was in the past, so relatively few stars will form in the future until the gas levels go below a critical surface density and shuts off (see section D in this paper). But if intra-cluster gas cools and rains down slowly that may prolong things a fair bit. Still, in about $10^{14}$ years normal star formation will have ceased.