Traction control and stability control have nothing to do with 4WD and AWD per se. They are added stability features that can also be found on other modern 2WD cars. On a 4x4 they support the 4WD or AWD system.
In short: 4WD and AWD provide increased vehicle stability. In case vehicle stability is about to be lost due to slipping tires, despite 4WD or AWD, traction control and stability control assure directional stability - however, none of them can defy the laws of physics. In plain English: if you are too fast for the road conditions - none of the features will keep you on the road.
Traction control and stability control have different goals:
keeps you moving without slipping wheels, while stability control
keeps you moving in the direction you intended the vehicle to go.