If you need to set a CSS class on change checkout stepwise then follow the below instructions.
You need to override progress-bar.js from
vendor/magento/module-checkout/view/frontend/web/js/view
to your current theme and replace the below js function.
/**
* @param {Object} item
* @return {*|Boolean}
*/
isProcessed: function (item) {
var itemCode = item.code;
if (itemCode == "shipping") {
jQuery('body').addClass('payment-step');
jQuery('body').removeClass('shipping-step');
} else {
jQuery('body').addClass('shipping-step');
jQuery('body').removeClass('payment-step');
}
return stepNavigator.isProcessed(item.code);
}

