This is mentioned in verse 6 as well when the list of gifts begins with prophecy. So the first way Paul shows us what sound judgment is is by telling us that he and we fulfil our role in the church only by the grace that is given to us. Secondly he says that the differing measures of faith that we have are owing to God's measuring out different measures of faith. So we cannot think more highly than is necessary because all that we have is by grace, and even the faith to receive and use grace is a gift. Finally, Paul shows us what sound judgment is by telling us that our gifts differ by God's design and that we relate as parts of a body, not contestants in a game.
Varied grace means differing gifts.
And since the gifts differ according to grace we cannot boast in them, but only receive them and be glad and use them to serve each other. The point here is that our differing gifts and differing grace and differing faith are supposed to be understood not as differences among contestants in a game where we try to beat each other, but differences among parts of a body where we try to serve each other. It's like the rugs my wife, Noel, is crocheting. She could take strips of cloth and lay them out straight, each the same perfect length beside each other. Then she could glue them or stitch them together and make a rug of equal pieces side by side but not interwoven.