I get this asked about this a lot.
There are some cork grips that are too loose when applying them to the bars, due to the individual differences of the grips since it’s a natural material.
I’ve seen people glue the grips to the bars, but that causes a lot of pain in the neck when bar swapping, so I use double sided tape.
Apply the tape like so…

I think of this as making the bar thicker, rather than fixing the grips on to the bar.

Now, slowly apply the grips by spinning it. By doing so, the tapes will start to twist and make the bars fatter.
Be careful not to over thicken the bars, as it will cause the cork grips to crack. If you feel it’s too tight, pull the grip out and remove some of the tape.
Once you put the grips all the way in, try twisting it and see if it moves. If so, add some more tape.

Here’s what it looks like before putting the grip in.
Applying too much tape will break the grip and not having enough tape will cause the grips to twist while riding. Keep trying until you have it perfectly locked in.