1. “Pada nirutti” in Pali is based based on phonetics, not based on grammar rules.
It helps understand the meaning of words formed by combining two words/fragments that contribute to the meaning.
P.S. The sound of the combined word comes from the fragments, but sometimes the pronunciation of the combined word is a bit changed for easier pronunciation. For example, the two words “na” (not) and “āgāmi” (not coming back) combine to yield “Anāgāmi” (not coming back to kāma loka) But many words are straight forward: sammā, tanhā, etc. See #2 and #3.
2. I have given many examples based on “san” in “What is “San”? Meaning of Sansāra (or Saṃsāra)”
3. More examples in “Search Results for: pada nirutti“