These spellings all include the suffix -ment, it changes the verb to noun.
Most of the time you can just add -ment onto the end of the word e.g. government.
There are some exceptions as always. With the words argue and judge you must drop the e before adding the suffix ment e.g. argument and judgment.
With the word merry, you change the y to an i then add -ment e.g. merriment.