how to add custom functionality after woocommerce place order button

You can use woocommerce_after_checkout_validation for custom validation. Following snippet might be helpful for you.

//Action to validate
add_action('woocommerce_after_checkout_validation', 'after_checkout_otp_validation');

//The function
function after_checkout_otp_validation( $posted ) {

    // you can use wc_add_notice with a second parameter as "error" to stop the order from being placed
    if (error) {
         wc_add_notice( __( "Incorrect OTP!", 'text-domain' ), 'error' );
    }

}