They did not win the war because of superior tanks or courage. It was inventive use of alternative weapons.
It was the 88mm anti aircraft gun with high velocity shells adapted to anti tank use that won the day for Rommel.
Rommel's tanks would advance, start fighting in advance columns, then retreat to draw in the British cruiser tanks in numbers to 88mm AA range. then they'd release the volleys from 88mm anti aircraft cannons, completely decimating the British cruiser tanks. This is how some of Rommels initial victories were won in tank battles in the desert.
" During the North African campaign, Rommel made the most effective use of the weapon, as he lured tanks of the British Eighth Army into traps by baiting them with apparently retreating German panzers. A mere two flak battalions destroyed 264 British tanks in 1941. Repeated high tank loss from well-placed 8.8 cm Flak guns in the battles of Halfaya Pass earned it the nickname "Hellfire Pass".
Later in that theater, in the Battle of Faid in Tunisia, Rommel camouflaged many 8.8 cm Flaks (with additional 7.5 cm Pak 40s and 5 cm Pak 38s) in cactus-filled areas. Inexperienced U.S. tankers and commanders rushed into a valley at Faid only to be obliterated. When the U.S. Army's M3 Stuart and M4 Sherman tanks pursued, concealed German guns picked them off at ranges far beyond those of their 37 mm and 75 mm guns respectively. "
Rommel's Panzers were far far superior to the British tanks. Not only that the British were changing their North African command endlessly and had never fully mastered tank warfare.
They got better as the war went on and In North Africa the British gained air superiority flying from Malta. The Panzers became easy prey in the vast open spaces of the desert with no cover and iffy supply lines.
The British managed to hold onto Tobruk which would have shortened Rommel's supply lines but he never managed to take Tobruk
One thing that few people get, is how hands on with desert ops he was. He wasn't afraid to get down in the field and roll up his sleeves, unlike any other feldmarschall on either side. This immeasurably lifted morale in the Afrika Korps.