What's more important? That Old Spock use his knowledge to help the Federation or that Kirk and Spock grow to become the heroes they are supposed to become?
What is more important? Ensuring the that your younger self has a bromance with your old captain, or saving billions of lives?
No temporal prime directive applies in this case. Spock is not from their future. This is a branching timeline, remember?
You seem to be convinced that if Spock gives out ANY information Starfleet and Kirk and Spock will be hopelessly stunted in their development because of it.
That's your claim, so offer the proof.
You also seem to be claiming that the original timeline is somehow the best of all possible worlds. The Prime Timeline certainly does not appear to be! There are many needless deaths we witnessed and have heard of in Trek (billions of them), which means that non-intervention hardly deserves presumption as being the best of all possible worlds. The question is,
if you can make the world a better place and can foresee no significant counter-ramifications, do you do so? Everyone else in Star Trek and the Real World does so - this is that it means to be an agent, to be a reasoner - to use information to navigate to the best possible world which is reasonably accessible to us.
If you could stop 9-11 from happening (warning authorities weeks in advance),
would you? America certainly changed as a result of 9-11 (e.g., roll back of civil liberties, never ending foreign wars, spiraling debt), but
these are changes we could have done without. Spock can act, as much as he can, to prevent such regressions.
It is just as likely that if Denova can be saved, Kirk might be the better for it. He might be less closed off emotionally if more of his family members survive.
Moreover, there are many needless deaths Spock could prevent which would substantively contribute (positively or negatively) to exploration to the cultural development of the UFP. You can protest -
"How do you know it would not! Maybe this is a butterfly!" But everything is a potential butterfly. In this altered timeline, maybe a slightly more immature Kirk attacks the Doomsday Machine head on and dies and dies if Old Spock says nothing. Who knows?
Bare possibilities cancel each other out. We have to reason in terms of what we do know. The Doomsday Machine is out there and it will destroy many solar systems and end many lives.
Possession of this fact outweighs any bare hypothetical possibility.