What exactly does one do in the Sabbath? "Observe the Sabbath day by keeping it holy, as the Lord your God has commanded you. Six days you shall labor and do all your work, but the seventh day is a sabbath to the Lord your God. On it you shall not do any work, neither you, nor your son or daughter, nor your male or female servant, nor your ox, your donkey or any of your animals, nor any foreigner residing in your towns, so that your male and female servants may rest, as you do."- Deuteronomy 5:12-14.
  
  "Remember the Sabbath day by keeping it holy. Six days you shall labor and do all your work, but the seventh day is a sabbath to the Lord your God. On it you shall not do any work, neither you, nor your son or daughter, nor your male or female servant, nor your animals, nor any foreigner residing in your towns. For in six days the Lord made the heavens and the earth, the sea, and all that is in them, but he rested on the seventh day. Therefore the Lord blessed the Sabbath day and made it holy."- Exodus 20:8-11.


So what exactly does "not doing work" mean? Does this mean worshipping God or alternatively, sleeping in, engaging in entertainment, hanging out with friends etc.?
Isalah 58:13

If thou turn away thy foot from the sabbath, from doing thy pleasure on my holy day; and call the sabbath a delight, the holy of the LORD, honourable; and shalt honour him, not doing thine own ways, nor finding thine own pleasure, nor speaking thine own words:

this verse sheds a little light on how to obey the commandment. according to him, hanging out with friends is clearly not recommended. then what remains? even “sleeping” is a verb, that is, an action that formally may be prohibited, which is absurd! There is a text, also, which says that priests in the temple violate the Sabbath by working, but it is possible for them. it seems to me that the only right option is to turn to the sources in the book of Genesis, it was there that the Sabbath was first mentioned. God rejoiced at everything that, according to the book, he did in 6 days, enjoyed it. According to this, it seems logical to me to assume that the actions of "rejoicing", "praying", "serving others" are the right way to fulfill the commandment.