We connect topological changes that can occur in 3-space via surgery, with black hole formation, the formation of wormholes and new generalizations of these phenomena, including relation-ships between quantum entanglement and wormhole formation. By considering the initial manifold as the 3-dimensional spatial section of spacetime, we describe the changes of topology occur-ring in these processes by determining the resulting 3-manifold and its fundamental group. As these global changes are induced by local processes, we use the local form of Morse functions to provide an algebraic formulation of their temporal evolution and propose a potential energy function which, in some cases, could give rise to the local forces related to surgery. We further show how this topological perspective gives new insight for natural phe-nomena exhibiting surgery, in all dimensions, while emphasizing the 3-dimensional case, which describes cosmic phenomena. This work makes new bridges between topology and natural sciences and creates a platform for exploring geometrical physics.