In biology, evolutionary game-theoretical models often arise in which players' strategies impact the state of the environment, driving feedback between strategy and the surroundings. In this case, cooperative interactions can be applied to studying ecological systems, animal or microorganism populations, and cells producing or actively extracting a growth resource from their environment. We consider the framework of eco-evolutionary game theory with replicator dynamics and growth-limiting public goods extracted by population members from some external source. It is known that the two sub-populations of cooperators and defectors can develop spatio-temporal patterns that enable long-term coexistence in the shared environment. To investigate this phenomenon and unveil the mechanisms that sustain cooperation, we analyze two eco-evolutionary models: a well-mixed environment and a heterogeneous model with spatial diffusion. In the latter, we integrate spatial diffusion into replicator dynamics. Our findings reveal rich strategy dynamics, including bistability and bifurcations, in the temporal system and spatial stability, as well as Turing instability, Turing-Hopf bifurcations, and chaos in the diffusion system. The results indicate that effective mechanisms to promote cooperation include increasing the player density, decreasing the relative timescale, controlling the density of initial cooperators, improving the diffusion rate of the public goods, lowering the diffusion rate of the cooperators, and enhancing the payoffs to the cooperators. We provide the conditions for the existence, stability, and occurrence of bifurcations in both systems. Our analysis can be applied to dynamic phenomena in fields as diverse as human decision-making, microorganism growth factors secretion, and group hunting.