The iTunes Application on your PC/Mac maintains your Music Library. An authorised copy your media - whether this material was "ripped" from optical media (e.g., CD) or downloaded from the Apple iTunes Service - can be transferred to your iThings.
While your Music/Media content, originally transferred from your PC/Mac using iTunes (or Finder on later Mac computers), or “Paid” material downloaded from Apples iTunes Service can be copied to other devices - the reverse process is not supported by Apple.
The reason for this intentional limitation, deliberately imposed by Apple, is to protect Copyright. In the case of iPadOS/iOS, Digital Rights Management (DRM) prevents direct copying of copyright material between devices is inhibited. This is intended to prevent the creation of illegal copies of potentially copyright material.
While it is technically possible to transfer your entire iTunes Library to another compatible PC or Mac computer, there are no native tools to transfer the library on your iOS/iPadOS devices back to a computer. If you do a little research, you may find some popular third-party software for your PC/Mac that might assist with the process.
Your best option would be to preserve your existing Mac until you have a replacement for it - and transfer the entire library from your "mothballed" Mac to the replacement computer.