Quick answer
Gray hair is royalty when righteousness put it there. The crown belongs to years spent in the right way, not to years merely survived.
Read both lines
The first line performs a coronation: age itself as regalia, in a culture where the old were to rise-worthy figures (Leviticus 19:32). The second adds the qualifier that keeps it honest: gray hair is evidence of years, not of wisdom; an old fool has simply had longer. But where the silver and the righteousness coincide, the proverb sees something splendid: a visible record of decades of small faithfulnesses, a head that earned its metal.
Related: Proverbs 20:29 · Proverbs 4:18 · Leviticus 19:32
New King James Version®, Copyright © 1982, Thomas Nelson. All rights reserved. Full copyright information. Scripture provided by API.Bible.
Go Deeper
If this verse has been used to put weight on you that it was never carrying, ask about it directly.