The Last Unicorn by Peter Beagle, I read that book so many times. It wasn’t my first experience with the fantasy/adventure genre, but I think it was the first I’d read with a bitter sweet ending rather than ‘yaaay everythings perfect now’. I loved the movie too, I actually have a framed poster hanging in my bedroom to this day. (and several other Last Unicorn things, both official and fan made)
I forgot about that book, holy cow. I think it inspired my love of survival video games when I got older lol.