Its a matter of experience in many situations. You need to sum up a position and see what weakness opponent has, strengths you have etc and decide what plan would work to your advantage. Take years and years and hundreds of games. Ive played over 200+ rated otb games in my time, mainly in the first4 years of my 8 years playing.
Im not very knowledgeable on chess books though.
Maybe my question is ridiculous...
I've learned some middle game technique,
for example, outposts, open file, semi-open file, minority attack,
space, tactics, weak pawns, and so on.
And then, I bought a book written about endgame.
However, most such books is purely written about endgame, K v K+P, K v K+R, and so on.
I have no idea how to battle between middlegame and endgame.
When middlegame ends, and endgame begins?
How to begin endgame with advantage?
Should I eliminate pawns which are extra for endgame?
How should I do it?
Should I exchange Queens or other pieces just before endgame?
Oh I'm disoriented...
So I'm looking for a book which gives me some insight into it.
I wish someone could tell me...
Thanks for your time.