The Punishment For Missing Mass
It is not really a black or white answer since you need to understand first what constitutes a mortal sin.
A grave matter
So, is it a grave matter to miss mass on Sunday? Yes, it is. God commands us to keep his day holy.
But, If any of these three are not present, then there’s a chance your action isn’t mortally sinful.
For instance, if you were going there and a loved one falls sick and you go back. Or your car breaks down or you fall sick yourself. This means that you did not set out to miss mass willfully but something happened.
Or if you didn’t know it is sinful to miss Sunday mass, this could also reduce culpability. Remember i said it is not so straightforward because someone might argue about what you SHOULD know but do not know.
Basically, if something as important as life prevents you from going, then it is understandable. If you choose not to go, then it is sinful. In which case you would need sacramental absolution before you can receive communion again.
“A person who is conscious of grave sin is not to celebrate Mass or receive the body of the Lord without previous sacramental confession unless there is a grave reason and there is no opportunity to confess; in this case the person is to remember the obligation to make an act of perfect contrition which includes the resolution of confessing as soon as possible”