Just to clarify some stuff… there’s a few layers to this situation…
The TLDR for the OP: Just rip your files using Handbrake or similar. It’s a standard thing that many people have done over the last decades; no need to overthink it.
Longer version…
Re: legality and piracy:
Most commercial retail DVDs are copy-protected, and often region-locked. You can’t just copy the files to a computer and expect to be able to play them back on a generic PC later. You have to get rid of the copy protection first. Whether this is piracy is a legal gray area. Bypassing the protection is in fact a violation of the Digital Millennium Copyright Act. But doing so to make a personal copy for your own use, and not redistributing it, may or may not constitute fair use – it’s not really been tested in court, as far as I know. But you would do so using the same process and tools that actual pirates use; the only difference being that you wouldn’t then go on to share your personal copy with thousands of other people. (See Digital Millennium Copyright Act - Wikipedia and Ripping - Wikipedia for legal status, and libdvdcss - Wikipedia and AnyDVD - Wikipedia for workarounds)
My home-burned DVDs of the kids and so on may not play right now- and most of them are 25+ years old.
For your home DVDs, you almost certainly don’t have to worry about copy protection. Just rip them into a modern format and keep the output files somewhere safe. You might lose the original menus and bonus tracks (if you made any), but the main video and audio should be rippable just fine.
Re: DVD file formats:
For commercial movies, separate from the copy protection, you wouldn’t want to just copy the DVD files to your computer even if you could. The video and audio codecs used in DVDs are ancient by today’s standards, and you can get the same quality in a much smaller file by re-encoding it to a modern video codec (which is what Handbrake does). But it’s still going to look a lot worse than a modern BluRay rip, or even the same movie streamed online, because DVDs max out at 480p. Modern 4k videos have 24 times the resolution… not 2.4, twenty-four.
But again, this doesn’t matter for home videos, since that’s (presumably) the only source you have – there is no 4k version to rip from. Thankfully, modern upscalers are pretty good, and even if you play back a low-resolution DVD rip, the right software (like VLC) can make the final output look even better than the DVD original thanks to modern upsampling and de-interlacing techniques.
Re: cables & connections
There is no reason to tinker with TOSlink, DVI, or any other cable aside from the USB connection from your DVD-ROM drive to your computer. Those other outputs, while “digital”, are used only for regular real-time playback (i.e. to a home audio system or TV), not when you’re reading the DVD disc directly on a computer. If you try to record the playback stream, you have to do so in real-time… that would take forever. There’s no advantage to that when you can just read the files directly off the disc much quicker.
When you rip from the disc to a computer directly, it is just reading the binary data directly off the DVD and this can happen 10-20 times quicker than real-time playback, depending on how fast your computer is. Probably the bottleneck will be your processor or graphics card, used in re-encoding the video, rather than your DVD drive speed.