Onomatopoeia refers to the formation of words, which (when spoken aloud) imitate the sounds related with the things/actions they refer to.
Boom: Bang, explosion, resound, etc.
Purr: Low continuous vibratory sound (especially of a cat), whirr, drone, etc.
The fireworks’ boom frightened the baby.
The cat purred when his master patted him.