[noun] + なりの + [noun]
[verb (plain)] + なりの + [noun]
[i-adj (plain)] + なりの + [noun]
[na-adj] + なりの + [noun]
Pronoun (私・自分・彼 etc.) + なりに / なりの + [noun]
The grammar pattern なりに / なりの expresses the idea of doing something in one's own way, to the best of one's ability, or in a manner appropriate to a given situation, status, or capacity. It conveys that while something may not be perfect or the best by external standards, it is fitting or suitable relative to the subject's position, level, or circumstances.
なりに functions adverbially (modifying a verb or clause), while なりの functions adjectivally (modifying a noun).
Attach なりに or なりの to nouns, pronouns, or certain verb/adjective forms to express "in a way befitting ~" or "in ~'s own way."
This is the most common usage – expressing that someone does something to the best of their ability given who they are.
Here, the speaker acknowledges limitations but emphasizes the effort or suitability within those limits.
なりに can also attach to adjective or verb plain forms, expressing "in a way appropriate to that quality or action."