Observation of intertwined density-wave orders and superconductivity in La$_{2-x}$Sr$_x$CuO$_4$