How to prevent a style sheet to affect a header.php or footer.php?

You can define specific stylesheets for specific PHP files.

If you are using a Child Theme, use the functions.php of the Child.

You should use something like:

function my_custom_css() {
wp_register_style( 'stylesheet_name', get_stylesheet_directory_uri() . '/stylesheet.css' );
}
add_action( 'init', 'my_custom_css' );

function my_custom_css_enqueue() {
// only enqueue on product-services page slug
if ( is_page( 'my-page' ) ) {
    wp_enqueue_style( 'stylesheet_name' );
}
}
add_action( 'wp_enqueue_scripts', 'my_custom_css_enqueue' );