Hi Stumpapi,
We're glad you've reached out through Apple Support Communities for help with removing these songs from the library in your Music app. We're glad to help!
As your Apple Music subscription is expired, the option to Sync Library between your devices isn't available. This means that changes on one device won't automatically reflect on your other devices.
We can recommend removing the songs from your Mac first, then syncing those changes to your iPhone. This way, you can select the Songs view on your Mac, enable the column to show the iCloud status for each song, and then sort all songs so that the affected songs you download from Apple Music are all together at the top of the list.
Then simply click on the first affected song, hold the Shift key, and scroll to the bottom to select the last affected song. This will select all affected songs at once, but leave the songs that you purchased or imported from sources other than Apple Music. Press the Delete key on your Mac to remove those selected songs.
Once that's done, you can sync your iPhone by following the instructions in this guide:
Sync music between your Mac and iPhone or iPad
If you prefer to manage your Music library on each device without syncing them, deleting songs from iPhone will have to be done manually for each song or album. Here's a guide with the steps. Let us know if you've got any questions about this information:
Delete music, movies, and TV shows from your device
Have a great day!