Phew, that's actually a pretty tough question, quite hard to remember.
Well, actually not that hard: I do know for sure that my first Trek book was the TNG Technical Manual
Thinking about novels though, that one's a lot more difficult, but maybe you guys can help me out ...
I think it was one of the early TOS books. It had a number on it, but that might not mean much, because it was a German translation (the first 30 or so Trek novels I read as a young teenager were in German since I simply couldn't read a word of English yet - my TNG Tech Manual was German, too).
It involved the Enterprise happening upon a Dyson Sphere-like world, except it was disguised as an asteroid, if memory serves. I think it turned out to be a generational ship in the end. There were a bunch of species warring inside it (or maybe just tribes of the same species) that had a preindustrial vibe yet had advanced technology all the same. Our heroes were first taken captive, then later ended up mediating the conflict. There was a B plot of the Enterprise on the outside trying to contact the away team and struggling with tech difficulties caused by the alien ship, I think with Scotty in charge aboard.
(I bet the actual plot is substantially different; should be funny to figure out just how much my memory apparatus twisted things up there.)
I do remember well how I got it, though: I was visiting a Star Trek convention in Berlin in the mid to late 90s, I believe it was a Galileo 7. My first con. I used my allowance to buy a bunch of novels on the trade floor, just picking by the covers and back blurbs. Ishmael was among them, and Crossroad, and a TNG omnibus that had a really nifty "Rendezvous with Rama" type story (I love "figure out alien artifact" fiction) set in a giant transporter multiplexer/forwarder complex. Ah, good times ...