Screenshots are at OS level, not web application. Remember back 20 years ago when people would disable right clicking via javascript? that was application level, and easily bypassable. Plus, even if you could block it at OS level, you could always virtualise an instance and screenshot via that. There are always ways to work around it. Heck, you could just use another device to take a picture of a screen.
Apps have the ability. Browser doesn't. Though Netflix etc have ability to block screenshots in browser for videos using some form of drm which won't work on regular text and images based web pages.
Google tells me that you can potentially remap the screenshot key using javascript but that probably won't block phone screenshots or screenshots taken using apps like sharex on PCs.