Which would work better for a small tank designed for urban use on low gravity worlds (inside cities on moons and such) tracks, wheels or something else?
Short Version : a Bren Carrier type vehicle.
Urban environments are not good places for tanks.
In your low gee world they become a worse place for tanks.
The tank is vulnerable in urban situations because it's relatively easy for infantry armed with anti-tank weapons to sneak up close enough to get a clean shot and disappear again leaving one disabled or destroyed tank.
In your low gee world the infantry can carry more gear including more anti-tank gear. They are a bigger threat than they were.
In general what infantry need in urban areas is a low key (low silhouette) compact vehicle capable of traversing difficult terrain and acting as a tractor or similar when needed. A little armor is useful for small arms fire protection, but not particularly useful otherwise. Some light weaponry (machine guns) would be sufficient.
They need a vehicle capable of rapidly moving them and operating as a fast taxi and resupply support. Something that can carry mens, ammunition, wounded to and from the fighting to support areas. It's not unusual for such vehicles to have winching capability and carry comms gear.
Go for legs.
Legs cost more per kilometer than wheels/tracks. Still they have superior elevation, larger range of hull-down positions, better recoil compensation allowing for a bigger weapon for the same weight, with low enough gravity can jump and even walk walls (damaging them in the process but not fallung down) and legs can be used as impromptu wreckingtools to make entrances for infantry with less danger to the entire building. 6+ legs also give redundancy making it harder to mobility kill than a tracked vehicle. Higher cost is no problem compared to aircraft for example, you use the best tool for the Job and legs in a future scenario are likely to fit the bill.
Legs have cons like higher mechanical maintenance, harder to fix on the battlefield and more fuel per kilometer.
Pro's are that even under current conditions using a derivative of an excavator arm for legs an 8-legged vehicle can weigh in excess of 120 tons, a "lightweight" vehicle like a 20 ton IFV would be easy especially when it gets "lighter" under low-gravity. Legs have superior recoil compensation allowing a larger gun on the same weightclass. Depending on how low- gravity, legged vehicles can jump and walls would have enough supportive strength to allow the legs to anchor in them so the legged vehicle can climb, a supremely useful trait in an urban environment. Legs also allow the vehicle a much larger angle on the chassis and with that a larger gun elevation, extremely useful for urban combat. Legs are closer to wheels in terms of redundancy, allowing multiple legs to be blown off without incapacitating the vehicle (unlike a track). The ability to modify the height of the chassis allows for shooting over obstacles without the need to have a specific ground at the obstacle, and the ability to duck back down behind the cover without needing to drive is a unique trait to legs. In some scenario's legs can also function as precision wreckingtools, capable of making a precise entrance for infantry witout risk of bringing the building down like driving a tank through would besides that this would be available to lightweight vehicles as well.
Many people think legs are too vulnerable. But no one in their right mind would fire at "the joints" of a legged vehicle, they would fire at where the legs meet the chassis. This gives you the largest target, the least jittery target (the legs constantly accelerate and decelerate) and gives a chance to hit a different leg or other part of the tank should you miss the intended target. Legs would be the most mine-proof option. The ends of the legs are most likely a thick piece of wear-resistant material, its not likely to just be blown off. The chassis is far enough away from the leg to cause injury or damage to vital parts with the mine's blastwave and the relative thinnness of the legs and the unlikelyhood that the mine hits the exact middle of the leg means most of the blast can just escape harmlessly.
Legs might be the most expensive option in maintenance time, materials and equipment required, but this is no different than tracks vs wheels, or aircraft vs ground units. Even "cheap" aircraft often have over 10.000 dollar per flighthour, and many aircraft spend multiple hours to rearm and maintenance after a single sortie unless truly necessary. You use the right tool for the Job, and in a future scenario legs seem to be a supremely useful option.
This actually has little to do with the gravity levels. In any gravity, tracks trade maneuverability for traction on soft or uneven surfaces, such as thick mud and off road. Since your vehicle is operating in an urban environment, there is no need for this.
Some more notes:
You might assume that low gravity means a wheeled vehicle can power through uneven areas, and the weak gravity will reduce damage to the suspension. This is only partially true. Each bump will cause the same damage, regardless of gravity. However, the low gravity means the vehicle can skip over more of the obstacles. Also, the damage on landing is reduced. I imagine it is devilishly complicated to calculate exactly how much more efficient the suspension is.
Horizontal recoil from heavy weapons would remain the same. Vertical recoil might increase though. Likewise for being hit by a concussive weapon. So the stability advantages of tracks over wheels is the same, regardless of gravity.
Low gravity means you can carry more armor without being crushed by your own weight. However, I don't think this is the crucial factor is selecting armor in general. It is just as hard to get that extra armor moving and turning as usual.
Most structures on a low-gravity world will be flimsier than usual.
If the gravity is low enough why bother with the ground-tank when you can just fit the same armor from a tank onto an aircraft? I say that if the environment allows it why not take advantage of the extra mobility afforded you by low-G and build flying tanks! (Or at-least Jumping Tanks).
There is already a great answer by @Demigan explaining why to take legs. I would suggest using legs but combining it with other means. For example like those jumping robots scaled up according to gravity. Boosters could improve in air maneuverability or continuous tracks if the surface is dusty like on the moon
In a low gravity environment, a legged vehicle will have an advantage, but not the ones that other people have mentioned.
You are fighting in an urbanized environment (possibly under some sort of containment dome), which means most of your threats are actually in a 3 dimensional matrix all around you, from people shooting from the rooftops to threats emerging from the sewers or firing from basement windows.
A sufficiently agile legged platform can operate in a 3D environment buy being able to climb walls or even scale the dome over the city. A spider like firing platform can manoeuvre through the complex 3D environment, either scaling walls to take up defensive fire positions, or climbing walls to assault defenders in buildings. A spider like fire platform on the inner surface of the dome can also use sensors to look "down" on the city and help direct operations or even fire at enemy targets.
People are often scared of spiders... weaponized spiders are even worse
Spider like chassis will also have the ability to move logistics in and out of the battle zone, or be used as carriers to bring casualties to safety or bring up extra weapons and equipment for special operations, such as engineers making a breach, or perhaps more urgently, engineers sealing a hole in the dome.
As an aside, the most useful size of vehicle would be small enough to fit through hallways and clamber up the side of buildings and into windows. We are really talking about combat robots rather than "tanks", but modern weaponry is very compact, and small guided missiles or electromagnetic weapons like rail guns would work very well in these conditions.
Spike missiles on a RWS
Dismounted Mini-Spike on a tripod. You could fit 4-6 of these missiles in the same space as the two Spikes in the upper illustration