Do I need an Apple Music subscription to use my CDs with iPhone?
No, that is not strictly needed. There would be extra convenience if you were a subscriber, though.
As an early adopter of Apple products I loaded all my music onto my computer in iTunes. It was a laptop which I replaced with an iMac. All my music is still there and was transferred to my phone.
All fine, that can still work. Sync your iPhone, iPad, or iPod using your computer - Apple Support
Note that this syncing is one way. Don’t delete the originals from your computer.
Today some newer phones later I discovered by accident as I usually shuffle a specific album I wanted to listen to on a long drive wasn’t there.
Either it didn’t sync in the first place, or it got deleted somehow. No way to trace that back. You may sync the tracks of that album again, to bring it to your iPhone.
Speaking with Apple support you have to have an Apple Music subscription to sync your own CD music to your phone!
That is incorrect in the strict sense. Hard to say what the misunderstanding was, not being privy to the exact conversation.
What is true, is that you would need an Apple Music subscription or iTunes Match subscription to have your CD music tracks as part of the iCloud Music Library.
There is a difference between syncing tracks from a computer to mobile (disk to disk), and having your music available for streaming from the cloud. The latter requires a subscription.
Someone at Apple needs to give their head a shake. Why buy a subscription to listen to your own music on an Apple device.
The subscription has its perks. Subscribers get access to “100 M songs”. Likely all your CDs and so much more, including mentioned iCloud Music Library (all your devices, without manual syncing), new releases, timed lyrics, spatial audio, real and virtual radio stations, playlist sharing, recommendations based on your taste, etc.
I also expect if I buy a new laptop I won’t get my music on it either?
Your imported tracks can be copied from the old Mac to the new Mac (or other laptop) through Migration Assistant, or manually. The same as could be done many years ago.