I know nothing about kids, but from personal experience and what I've read, the key to getting autistic people to understand rules is to explain why the rule exists. Because otherwise, it's just a random thing that you have to memorise, and a person only has so much memory to go around. Things you don't think are important (like random things that don't make any sense) tend to be the first to go when you need that memory space.
Everybody acts according to what they think best at the time (even if it doesn't make any sense to an outsider). So if someone doesn't understand why, then their actions are going to be based on that lack of understanding.
And when explaining why, remember that autistic people don't see the world the same way as neurotypicals, so a "neurotypical why" might not make any sense to an autistic child.
I think of navigating neurotypical culture as like being an anthropologist studying a lost tribe of cannibals: they have a complex culture with lots of seemingly arbitrary rules. Even they cannot explain all the rules, or even recognise that some of the rules exist. However, the rules are inflexible and if you contravene any of them, you will get eaten. Also, asking about the rules, whether they can explain them or not, is against the rules and you will get eaten. So, you know that you are going to get eaten at some point - the question is just when.
As an autistic person, therefore, your entire life consists of trying to figure out what these seemingly arbitrary rules are. It's very stressful. It's probably particularly stressful for children your grandson's age, who are old enough to understand that a) there are rules, b) they don't understand the rules, c) everyone else seems to understand the rules just fine, and d) they get punished for asking about the rules [because that's being cheeky/disrespectful]. Yet, they are are not old enough to have enough life experience to figure out for themselves what the rules are.
For example, things I've come across include...
- A lack of true participation in neurotypical social hierarchy. Autistic people tend to give respect based on whether it's earned based on what you do, not on who you are. So may not understand that certain classes of people should be treated with respect (older people, teachers etc) even when they're wrong/idiots. One can learn to understand the concept, but one never truly participates. One just learns to go through the motions and fake it. But that will probably need to be explained to a child.
- School (especially nowadays) can be very difficult for autistic kids because A) the emphasis on LOTS AND LOTS OF BRIGHT COLOURS can make the environment physically painful, B) rapid switches of topic/activity can be stressful/distressing to a mind that thrives on doing one thing properly, until it's done (or forever...) C) the modern obsession with "group work" is a nightmare for anyone who finds social interaction difficult. The approach to "Johnny is autistic and finds group work difficult/distressing" is often "Johnny should be made to do even more group work until he figures it out". There is no acknowledgement of the fact that Johnny finds group work difficult and stressful because he is neurologically different from the other kids and doesn't understand why they do what they do (and they're kids, so they just see him as weird, not as someone who needs help).
- Autism is often seen as a constellation of deficiencies and defects. Being treated as defective by the people around you (especially those you love) isn't going to be pleasant for anyone, particularly a child. Autism definitely does come with its deficiencies - but it also comes with strengths, which may be more or less apparent for different people. Making an effort to discover what your grandson does well, or could do well - if it were done differently - may help. There is often an emphasis on making autistic people do things the way neurotypicals would do them (because "that's the right way") instead of figuring out a more autistic-friendly way to get to the same desired endpoint. Yes, autistic people have to survive in neurotypical society and need the skills to do so - but sometimes the best way to do that is to work with the person's autistic characteristics, not against them.
- There is a lack of understanding that autistic people do things for logical reasons, like everyone else. The classic example is various types of stimming - like hand-flapping etc - that neurotypicals find weird and unsettling, and try to make autistic people stop doing (with threats of punishment/withholding of pleasure). Setting aside that this is treating the autistic person like an animal to be trained, it doesn't consider why the autistic person is stimming in the first place. It often/usually has a specific purpose, like reducing stress or aiding concentration. Since reduced stress and increased concentration are good things, why stop the autistic person doing something harmless (like hand-flapping), simply because neurotypicals don't like it? If it's not possible to simply accept the stimming and move on, a better approach would be to try to alter the environment to reduce stress and increase concentration so that stimming isn't needed. (And yes, autistic people have to live in the neurotypical world, so a certain amount of "fitting in" is necessary for a quiet life. But it should be done in a way that helps the autistic person, not in a way that results in them having to "mask" (fake neurotypical) so much that as soon as they're alone they collapse into a non-functional heap (or have a meltdown) because of the stress of it all.)
However, the first thing that any autistic person needs is someone who loves and accepts them for who they are, without putting demands on them to be somebody they're not. And it's sounds like for your grandson, that's you!