You need to turn off Sync Library AKA iCloud Music Library in both your computer and device. When you're signed into your Apple ID you will see any unhidden past purchases that are not already downloaded to your computer as being in the cloud. You can select and download these to get local copies, or hide any items that you no longer want. See Hide and unhide music, movies, TV shows, audiobooks, and books - Apple Support.
You can use File > Library > Add to Library to import any media in your media folder that, for whatever reason, is no longer listed in the library. You should be able to download new purchases when you make them as long as there is room on your hard drive. In general any changes you make to metadata in your library will stick, but occasionally iTunes may fetch the original data from the store for purchases and show this instead of any custom details you've set. If you find this happens hide the item from your purchase history to stop that happening again.
tt2