  Context: High-resolution spectrographs fed by adaptive optics (AO) provide a
unique opportunity to characterize directly imaged exoplanets. Observations
with such instruments allow us to probe the atmospheric composition, spin
rotation, and radial velocity of the planet, thereby helping to reveal
information on its formation and migration history. The recent upgrade of the
Cryogenic High-Resolution Infrared Echelle Spectrograph (CRIRES+) at the VLT
makes it a highly suitable instrument for characterizing directly imaged
exoplanets.
  Aims: In this work, we report on observations of $\beta$ Pictoris b with
CRIRES+ and use them to constrain the planets atmospheric properties and update
the estimation of its spin rotation.
  Methods: The data were reduced using the open-source \textit{pycrires}
package. We subsequently forward-modeled the stellar, planetary, and systematic
contribution to the data to detect molecules in the planet's atmosphere. We
also used atmospheric retrievals to provide new constraints on its atmosphere.
  Results: We confidently detected water and carbon monoxide in the atmosphere
of $\beta$ Pictoris b and retrieved a slightly sub-solar carbon-to-oxygen
ratio, which is in agreement with previous results. The interpretation is
hampered by our limited knowledge of the C/O ratio of the host star. We also
obtained a much improved constraint on its spin rotation of $19.9 \pm 1.0$
km/s, which gives a rotation period of $8.7 \pm 0.8$ hours, assuming no
obliquity. We find that there is a degeneracy between the metallicity and
clouds, but this has minimal impact on the retrieved C/O, $v\sin{i}$, and
radial velocity. Our results show that CRIRES+ is performing well and stands as
a highly useful instrument for characterizing directly imaged planets.
