Yes a Mason Jar is great for storing ground coffee in after you've ground the coffee beans.
When you store ground coffee you should store the ground coffee in a container that has a tightly sealed lid which a Mason Jar works great at.
The Mason Jar will provide a good tight seal to keep the coffee grounds fresh.
You can also use empty coffee containers that the coffee grounds come in already ground.
Or use some vacuum sealed bags that you put food in and you can place the coffee grounds in those bags and then remove the air from them.
The vacuum sealed bags will keep the ground coffee fresh.