Hold on - grasp or support something with one's hands.
Hold to - Not a meaningful phrasal verb
Hold against - to use (something) as a reason to have a bad opinion of (someone).
Hold onto - to keep something that is an advantage for you; to not give or sell something to somebody else.
As per the meanings, 'hold onto' fits in the blank and implies that it is being suggested to keep the particular thought for future.
The complete sentence is: Hold onto that thought. It will be a great idea someday.
Hence, option (d) is the answer.