To start with, you will need a place to store the flac music files and a way to play them back. This is usually a music server. There are many, many ways to implement this. The files and the player may be on a laptop, or on some dedicated piece of hardware. I use a NAS (Network Attached Storage) box to store my files and host the server program, and a Squeezebox Touch to play them through. A cheap way that many people use is the Raspberry Pi. It can handle the storage and the playback functions, or just the playback, with the files on some other device on your home network. There are so many ways to go about doing this, it is hard to discuss them until you narrow down what you want to do a bit. Look around for Raspberry Pi servers / players. There is a bunch of step-by-step instructions on how to put it together out on the web.
Since your Yamaha probably doesn't have any digital inputs, you will need a DAC (Digital to Analog Converter) to provide the analog signals from the server to your Yamaha. In my case, the Squeezebox Touch has a built in DAC. If you go with a Raspberry Pi, there are DACs that plug onto it, or you can use a USB DAC. Again, so many options.
This would let you play flac songs you download, and of course you can rip your CDs to flac and play them also. There are some apps for smart phones that let you control the server and choose what songs to play.
As far as ripping your vinyl (called 'needle-dropping'), I would stay with your Thorens and add an interface. A popular one is the Focusrite Scarlett 2i2.
https://us.focusrite.com/usb-audio-interfaces/scarlett-2i2
It connects to your PC through the USB and digitizes the analog signals from your turntable (after going through the phono amp section of your Yamaha). Then you use software on your PC to record the vinyl. I use a program called Goldwave, but again, there are many choices. Another program called Clickrepair can be used to clean up the clicks and pops from the digital file. A lot of people use Audacity, which is a freeware program that lets you record and clean up noise. The programs will let you save the files in flac format.
The Focusrite 2i2 also has a DAC that can be used for playback, depending on how you set up your server. You can probably connect the audio interface (Scarlet 2i2 or whatever) into the tape loop of your system.
I hope this helps get you started. I know it seems like a lot to learn, but separate out the server (playback) functions from the needle-dropping (recording) functions and start looking a piece at a time. Start with the server side since that will let you play any files you want to download or rip from CD. The recording of the vinyl can wait 'till you get the server running.
Terry