The issue you're encountering arises because syncing music directly through Apple's built-in "Sync Library" feature requires an active Apple Music or iTunes Match subscription, which you currently do not have. This is why the option to "Sync to Library" doesn't appear in your settings. Additionally, music files transferred manually from your Mac to your iPhone's Music app can't be directly exported to iCloud, as Apple's Music app restricts direct access to these files.
Since your external drive has failed and your only copies of these music files currently reside solely on your iPhone, your best solution is to use third-party software to safely extract and transfer them back onto your computer. Reliable options include applications such as iMazing, AnyTrans, or TouchCopy. You’ll need to install one of these programs onto your Mac or PC, connect your iPhone via USB, and follow the program’s instructions to extract the music files to your computer. Ensure the files have been successfully transferred and are playable before proceeding.
Once the music files are securely copied to your computer, you can easily upload them to your existing iCloud storage using iCloud Drive. Simply open Finder on macOS or File Explorer on Windows, navigate to your iCloud Drive folder, and drag your music files or folders into this location. Allow sufficient time for the files to fully upload and sync to iCloud.
After uploading, you can conveniently access your music files directly through the Files app on your iPhone. Simply open the Files app, select Browse, then tap iCloud Drive to view and play your music. This approach, while slightly less integrated than Apple's Music app, provides reliable storage and playback without requiring additional subscriptions.
For a comprehensive backup strategy, you might also consider purchasing a new external drive or SSD to maintain a local backup in addition to your cloud storage. This dual approach ensures your music collection remains secure and accessible in the future.