Bless you it's so hard. It's not always possible to just avoid the toy aisle either as they really want that pester power sale so put things everywhere at children's eye height.
What I found helpful at that age was setting up for success whenever possible.
So online shop or go without him if you can. (You might want to check if you're eligible for a nursery place?) When you can't, shorter more frequent trips are easier than long infrequent ones. Take a list so that you are not frazzled trying to make decisions about what to buy while managing him. Consider ordering long life stuff (tins, packets) on amazon or similar so that it is only fresh food you need to buy. And if possible, smaller supermarkets with less choice are easier than massive ones you have to walk all around. I know sometimes those types of supermarket cost more - something like Aldi if you have one can be great in that case.
Two year olds are still in the chaos nugget so I would not want him wandering around as this is just impossible IME, I get so stressed. Keeping him contained is key. Bribery is not a sin. Take a buggy (and buy an amount that fits in a basket, you can often rest on handles) or bribe him to sit in trolley with a snack or a toy or a phone (shock horror! Whatever you need to get by is FINE.) or just talking to him - whatever works. I also let mine sit in the actual main part of the trolley if they want to and won't climb out - ignore random judgy faces. The trolleys sit outside in a car park, toddler shoes are no dirtier than this , nor the warehouse where all the stock is kept.
Pick a time of day when he is not tired and has already had a chance to be active and have some attention from you. Playing a game while you walk to the supermarket is great. Make sure he's had something to eat in the previous hour or two. Children find it harder to behave well when they are tired, hungry, or craving attention or have excess energy. Also, dress him warmly as the supermarket can be cold, but if you've walked there/back in the cold, let him take his coat off or he'll be too hot.
Choose an inexpensive item that he can choose as a treat, e.g. small drink or sweet or bakery item for the way home, or something you'd buy anyway but let him have a choice like type of cereal, yoghurt, etc. When he wants toys, remind him that he can choose a [drink/yoghurt/cake/etc] when you get to that aisle. You can also tie this to good behaviour if you like (I don't - because IME, it is harder to come back from if you'd got to the point of taking it away, whereas if it's unconditional you can keep using it as a reminder or distraction)
A different way to do this is to let your child earn rewards and when the reward chart is full, then they can choose a treat, but not every time. When DS1 was about 2 (or possibly 3) this worked brilliantly as he was always wanting a comic and I couldn't afford them every time. I would give him "stars" for good behaviour randomly and when it got to 5, which would be about once every 1-2 weeks, he was allowed to choose a comic. When we were in the shop I'd remind him "How many stars do you have?" and he would be able to say oh, 2. And would stop asking for it, because he knew he could get one another time.
Or if you have a set routine you could say we get a [inexpensive treat] on Fridays but today is Wednesday.
Whichever way you choose to do it, remind him of your expectations before you enter the shop. So let him know: We are buying food, but no toys today. Or Today, you can choose a cake if you're good. Or it's Friday, so it's book day. You can choose a book today but not toys.
Remember to praise him when he does behave well in the supermarket. Sometimes we are so frazzled that we forget, but that means they get more attention from negative behaviour which is not what you want because it reinforces that behaviour is the one that works. If you often find you forget to praise (it happens!!) make a list of your current top 5 problem behaviours, then write down next to them what the opposite/what your expected behaviour is, and be specific.
So for instance:
Misbehaving in the supermarket
= Sitting calmly in the trolley, listening to directions, not whining for toys.
Writing out this list helps you recognise when good behaviour is happening so you can notice it and comment. Even if he misbehaves for half of the trip, comment and praise and notice the OTHER half when he is doing well.
In response to I physically cannot get him into the trolly he's too big and fights it - I get what you mean because trolleys are fiddly posting their legs through, and even my 1yo can easily climb out when he's had enough - but just in case, reading this article from Janet Lansbury helped me a lot:
www.janetlansbury.com/2012/09/respectful-parenting-is-not-permissive-parenting/
In particular, the line "You say your boy is strong, but you are stronger, aren't you?" I often felt out of control and defeated when DS1 was little, especially between the ages of 3 and 5. He was strong. But I was stronger, even though in the moment I didn't feel it. Reminding myself "I am the adult here, I am stronger than a two year old" helps me out of that defeated mindset and helps me not overreact to the emotional stuff that the article talks about, which is what was really happening - he wasn't actually overpowering me, I was just feeling guilty about upsetting him.