High-contrast imaging of exoplanets and protoplanetary disks depends on wavefront sensing and correction made by adaptive optics instruments. Classically, wavefront sensing has been conducted at optical wavelengths, which made high-contrast imaging of red targets such as M-type stars or extincted T Tauri stars challenging. Keck/NIRC2 has combined near-infrared (NIR) detector technology with the pyramid wavefront sensor (PWFS). With this new module we observed SR~21, a young star that is brighter at NIR wavelengths than at optical wavelengths. Compared with the archival data of SR~21 taken with the optical wavefront sensing we achieved $sim$20% better Strehl ratio in similar natural seeing conditions. Further post-processing utilizing angular differential imaging and reference-star differential imaging confirmed the spiral feature reported by the VLT/SPHERE polarimetric observation, which is the first detection of the SR~21 spiral in total intensity at $L^prime$ band. We also compared the contrast limit of our result ($10^{-4}$ at $0farcs4$ and $2times10^{-5}$ at $1farcs0$) with the archival data that were taken with optical wavefront sensing and confirmed the improvement, particularly at $leq0farcs5$. Our observation demonstrates that the NIR PWFS improves AO performance and will provide more opportunities for red targets in the future.