How Samsung achieves this is through pixel-level light control, adjusting its OLED emission so that light only shines toward the user when facing directly at the phone screen. As you pan left and right, the part of the Privacy Display that you can set to block sensitive notifications, 2FA codes, and more fades to black. Notably, the feature wouldn't reduce the phone's overall brightness or color depth, unlike a physical privacy screen protector.
You may have seen those privacy screen protectors that limit the viewing angles of the phone's (or laptop's) screen so that you can see it head on, but people off to the side can't peek over your shoulder. Samsung seems to have figured out how to achieve the same functionality without a special screen protector - and, more importantly, the feature can be toggled on or off as desired. Initially spotted inside One UI 8.5 code, the Privacy Display feature is described as such: "Limits screen visibility from side angles to protect your privacy in public."