Punishment only works if it's something you care about... your grandson apparently doesn't mind giving up his freedom for a time.
If my daughter misbehaves, she is sent to bed to think about what she has done. This gets her out of the situation and does not tempt her to make a scene and disrupt the rest of the family like your grandson is doing.
If being sent to her room for a few minutes does not do it, or if the offense was major or repeated then she loses something. It may be an event she was to attend or a special toy or a privilege like watching her favortie cartoon.
When she does the behavior, I tell her "you are going to be punished for {whatever she did}. Your punishment is going to be {name punishment}. Do you want your punishment or do you want to change your behavior?" I always give her the chance to do the right thing. If she chooses changing her behavior, I say "Ok, what should you have done instead?" and then she tells me what her good behavior should have been. That way she knows right / wrong behavior, consequences to her actions, and how to make her own good decisions. She also learns that misbehaving is her own choice, as is receiving punishment... so she is the one in control of her own situation and not me or anyone else.
If she chooses to continue misbehaving, or if it is a major offense or one that she has repeated frequently in the past then she loses something. Once she has lost the item for a time, I give her the opportunity to earn it back by demonstrating good behavior. Again, she learns that SHE is the one in control of her own circumstances.
But, one of the most important things is that I don't just punish her bad behavior. I frequently reward her good behavior. So if she's draws on a wall, she gets punishment because she knows we only use crayons on paper. BUT another time when she is coloring for awhile and has only colored on paper, I make a big production out of it. "Oh my! What a great coloring girl you are! You only used paper just like you're supposed to. Time for a good egg!" and we keep a little basket of plastic easter eggs on the kitchen counter with rewards in them like stickers, a little piece of candy, a new dress for barbie, etc. That way she doesn't just learn proper behavior from punishment which feels bad. She also learns correct behavior in a pleasant way which feels good.
Your grandson seems to be asking for more attention. So in addition to punishment/rewards, maybe it's time to smother him with some good old-fashioned love. Hug him a few more times a day. Tell him you love him a few more times a day. Tell him how wonderful he is and how lucky you are to be his grandma. Even though we do it a lot, sometimes kids need a heavy-duty dose of it. They don't know how to ask for it, so they act out instead. Good luck!