Most environments favor defection over cooperation due to natural selection. Nonetheless, the emergence of cooperation is omnipresent in many biological, social, and economic systems, quite contrary to the well-celebrated Darwinian theory of evolution. Much research has been devoted to better understanding how and why cooperation persists among self-interested individuals despite their competition for limited resources. Here we go beyond a single social dilemma since individuals usually encounter various social challenges. In particular, we propose and study a mathematical model incorporating both the prisoner's dilemma and the snowdrift game. We further extend this model by considering ecological signatures like mutation and selfless one-sided contribution of altruist free space. The nonlinear evolutionary dynamics that results from these upgrades offer a broader range of equilibrium outcomes, and it also often favors cooperation over defection. With the help of analytical and numerical calculations, our theoretical model sheds light on the mechanisms that maintain biodiversity, and it helps to explain the evolution of social order in human societies.