Make and keep a backup of your iTunes library, and only stream from the cloud.
Be aware that iTunes Match/ Apple Music are not a backup service and should not be relied on to be one. FAQ: Why iTunes Match Can Not Be Used as a Backup
The best practice is to buy an external HDD (preferably 1TB or more) and copy the entire iTunes folder to that drive. Once that copy has completed open iTunes while holding the Option key and select "choose library" and navigate to the "iTunes Library.itl" file on the external HDD, select it and click OK. Next, close iTunes and open it again while holding the Option key and choose "create library" . Open a different iTunes Library file or create a new one - Apple Support. In the new, empty library go to preferences and check iCloud music library. Now you will see all your music in the cloud and be able to stream it. Now you may move the iTunes folder on the internal storage of your computer to the Trash and empty it.
When you add new content to your library be sure and connect the external HDD and switch libraries to use the one on the external HDD.
See also Manage and back up your iTunes media library - Apple Support