As one of the last carryovers from the Classic era, Knuckles the Echidna has had quite a chronicle throughout the franchise. It's no secret that his portrayal or characterization across the series has varied from time to time, not unlike that of Amy or occasionally Eggman. Initially a chuckling antagonist, eventually dutiful neutral, then a hotheaded rival, and finally one of Sonic's toughest friends, Knuckles has changed quite a bit. It's just a shame that said change wasn't really documented attentively.
Born on Angel Island as the last of his kind, it was his assumed birthright to protect the Master Emerald and its power from those who would abuse its power. The solitary nature of this existence meant he was simultaneously hostile to anyone he perceives as a threat, but receptive to those he did not. This made it easy for Dr. Robotnik to convince him of his Death Egg’s innocence and Sonic’s supposed villainy. So he took the Chaos Emeralds from the hedgehog and delayed him with his traps until Robotnik showed his true colors by stealing the Master Emerald to power the Death Egg as well as sending both his Eggrobos and Mecha Sonic to deter the heroes. Ultimately, Sonic and Knuckles worked together to defeat Eggman, restore Angel Island to the sky, and part ways to return to their contrasting lives.
Since then, Knuckles has had numerous encounters with Sonic, some as nemeses and others as allies. Though they ultimately understand that the other has somewhat well-meaning intentions, the differences between them often caused some measure of conflict. Additionally, their lifestyles were also parallel in that Knuckles felt duty bound to watch over Angel Island on his own, while Sonic enjoyed the freedom to both travel & protect the world below as he pleased. Eventually, the two would amend their rival enough to be able to work together and even just hang out from time to time. But the actual period of warming up to each other has generally been skipped through within the main series and thus Knuckles has lost a fair chunk of his direction as a character.
It would have been a more satisfying progression if we had actually gotten to see some of the procedure Knuckles underwent to grow into something more than his background. First, it would have made for genuine challenge to see him overcome his habitual distrust of Sonic, perhaps by trying to at least recognize some of what rubs him the wrong way about the hedgehog. Second, the process of learning to trust others within reason could expand to sensitively learning to value the outside world as a place that others call home. Third, Knuckles’ paranoia and aggression could be tempered through an increased ability to balance his personal job with an occasional allowance of simple fun in his life, such as indulging in his treasure hunting hobby. Eventually, this would have more naturally developed him from someone who felt like he had to be obsessively stern to keep his heritage in isolation to someone who can be friendlier or even playful because he’s able to appreciate the world that lives under his watch.