First, make sure the cart total is recalculated every time the user changes their payment method:
add_action('wp_footer', 'trigger_checkout_refresh_on_payment_method_change');
function trigger_checkout_refresh_on_payment_method_change(){
if ( is_checkout() && ! is_wc_endpoint_url() ) :
?>
sssccc
Depending on the logic you want to implement, there are multiple ways to round the price, but if the user chooses "Cash on Delivery" as the payment method, here is the easiest way to round the total:
First, make sure the cart total is recalculated every time the user changes their payment method: