Thou shalt live as thy parents lived, and work as thy parents worked.
That would pretty much stop everything, if people stick to it. Some allowances would have to be made for people to step into needed roles here and there, though. But it'd keep society generally static, since all positions of power - not just monarchy/chiefdom - would be inherited by default (which could be an incentive for whomever first introduced the "law").
It does however requires a very stable population and climate. But that condition can also work the other way: Stability can preclude the need for societal change. You're supposing someone has to make sure it doesn't change, but around the world there are still peoples/tribes who live much like their ancestors did a thousand or more years ago, simply because they've had no urgent need to do anything else. Nobody sat down and agreed to hit pause on the whole thing.
But such cultures are few and far between now due to the encroachment of other cultures. So your society would have to avoid contact with the rest of the world, if it's to remain static. That should probably be a commandment too, somehow. Not that contact by itself would necessarily bring about the end of the society (infectious diseases notwithstanding), but if those other cultures show up to fight, it's a different matter. Superior weapons technology - which seems to be something you're alluding too with all the talk of gunpowder - sadly spreads faster than most any other technology. E.g. you'll all too easily find AK-47s in places without basic sanitation.
And since your society is in a place with plentiful resources, someone will likely show up to grab it. So provided your society isn't immediately wiped out by an external aggressor, and provided they even try defending themselves, they'll soon have to get a bit more creative than usual.
Point is: It'll be difficult to enforce a static society, unless the conditions are such that you don't need to enforce it.
But some do try. For real-world inspiration, look to the Amish. They shun modern technology (some groups more than others), though they're staying ahead of medieval times*. Or look at religious institutions with monks or similarly dedicated adherents; they often eschew technology in their own lives. For the most radical approach, there are the few muslim extremist that advocate returning (by force) to the time of the Prophet - which would in fact be the middle ages.
But with some regressive religious notions, it's not that the religious texts or their (earthly) authors necessarily meant to freeze society. Sometimes it's just that they laid out how a contemporary society should work - contemporary to themselves, that is. And the way they did it didn't (couldn't) account for hundreds or thousands of years of change. Imagine if current-day building codes became inviolable holy text: A thousand years from now, it'd force believers to build houses like ours, despite the advent of sentient nanoswarm construction and the fact that most humans live in nutrient-filled orbital tubes or something.
Speaking of space, you can watch Star Trek: Insurrection, which features a society very much like what you're talking about. Spoiler:
They're actually very advanced, but actively choose "the simple life".
It's not a great movie, though.
*) As pointed out by Michael Hampton in the comments, this is a too-simplistic a description. The Amish do not summarily reject modern technology, they simply prioritize it differently and are much more cautious and deliberate in adopting it.