Making a backup is not illegal
How to Rip 4K and Blu-Ray Movies | The Official Guide
Whatever the questionable legality surrounding it, I would argue that you have every right to digitally back up ("rip") your legally purchased DVDs and Blu-rays. Discs don't last forever, so you should have a digital backup on your hard drive just in case. As long as you don't share that file illegally online, you haven't broken any laws.
Modern discs often have built-in copy protection, but there is one software program that is often very good at bypassing that protection and delivering a high-quality HD copy of your movie or TV show. That app is called MakeMKV. It is free for DVD discs, but for Blu-rays you will have to pay for an activation key after a 30-day trial period.
MakeMKV – as the name suggests – generates an MKV file from your drive. MKV is short for “Matroska”, it is an open-source file format and can be easily played by VLC Player. If you want to use another media player, you will need to install codecs to make the file work.