ITunes deleted itself, I have all my playlists on my phone. I restored the library to my computer but I want to transfer the playlists over?

So basically my iTunes completely reset itself (problem with my external drive). I lost the library file. The songs are all back, but I have quite a few playlists. They re all on my phone (iPhone 8) but I want them back in my iTunes (12.7.3.46). It's acting like my phone has never been connected which I expected but it's frustrating because it used to just add the playlists to my computer. Do I have to just manually recreate the playlists or is there a less laborious way to go about it?

ITunes only syncs from not too your iPhone, so you will need some payable third party software to transfer your playlists