Most Blu-ray’s now come with digital files. You can upload these to a server like Plex (this requires you to setup a Plex server which I don’t expect the average consumer to be capable of, but uploading it to a MacBook or whatever is basically enough) to digitise your collection. Now you still own the physical media, and have a digital version of it as well.
And this is completely legal.
You could also skip the buying the physical Blu-ray part. But that is less than legal (but you’re unlikely to get caught… just saying, yar har)
The only books I have physical copies of are for ttrpgs. And even then I have a digital copy.