WP deregister, register and enqueue dequeue

You should be able to just dequeue the script or style if it’s not the pages you want it on.

function wpa_scripts() {
    // if this is not the contact page, remove the script
    if( ! is_page( 'contact-us' ) ){
        wp_dequeue_script( 'contact-form-7' );
    }
}
// adjust priority to make sure this runs after the plugins add their scripts/styles
add_action( 'wp_enqueue_scripts', 'wpa_scripts', 100 );