Can you have different iTunes libraries on the same computer?

can you have different iTunes libraries on the same computer?

I have a massive headache with Apple music currently - multiple devices but only one 'main' iMac, which is where all my library (over 8000 songs are held) - I am trying to use Apple music, but it keeps deleting my playlists that I make?

Original thread: https://forums.imore.com/threads/can-you-have-different-itunes-libraries-on-the-same-computer.347396/