The 3rd commandment forces us, under pain of sin, to attend Holy Mass on Sundays. If you want to save your soul, you need to attend Sunday Mass.
That's not entirely accurate. Divine Law of the Third Commandment bids us to keep Sunday Holy. It's then Church Law on top of that mandating that in order to comply with the Divine Law we have to assist at Mass on Sundays. So assisting at Mass on Sundays isn't per se Divine Law. So, for instance, in some of the Eastern Rites, Catholics there satisfy their Sunday obligation by attending Divine Office, such as Matins/Lauds or Vespers. In theory, the Church could mandate one hour of prayer, meditation, and praying the Rosary, or one hour of prayer in church before the Blessed Sacrament. It wouldn't strictly have to be assisting at Holy Mass.