The South Pole Telescope (SPT) and its third-generation camera (SPT-3G) are a highly sensitive facility for observing cosmic microwave background (CMB) temperature and polarization anisotropies at small angular scales. The power spectra of CMB primary anisotropies and lensing obtained from SPT-3G data are providing new critical information on the composition and evolution of the universe, shedding new light on long-lasting cosmological tensions such as the Hubble tension, and discovering potentially new ones like the discrepancy of the matter density constraint from CMB and BAO data. In this talk, I will give an overview of the most recent SPT-3G results obtained from the two-year survey of the SPT Main field (SPT-3G D1). I will then present near-future prospects, showing that an upcoming extended survey with SPT-3G will deliver constraints on key cosmological parameters up to a factor of two more tightly than Planck, which will soon further advance our understanding of the cosmos.