When you cancel an Apple Music subscription, the following stop working and can go away at any time:
- Offline listening copies of subscription songs
- Playlists containing subscription songs
- "Sync Library" copies of songs (including purchased songs). E.g., if you had music from your own CDs on your Mac, and "Sync Library" put a copy on your iPhone, the iPhone copy would stop working when you allowed the subscription to lapse.
I don't believe that you get any of these back if you take out a subscription again. You have to build your playlists, and re-download offline listening copies, from scratch.
When you cancel an Apple Music subscription, it should leave original copes of purchased music (from CDs, from the iTunes Store, etc.) alone. You can re-download songs purchased from the iTunes Store directly from there … and you can presumably re-download all purchased music by manually synchronizing your iPhone and computer.