Site icon Hip-Hop Website Design and Development

Correct way to enqueue page specific CSS file

I am looking for an alternate way than using functions.php and applying conditionals based on each page’s ID, instead I would like to enqueue the CSS right at the top of each page like this:

<?php
defined('ABSPATH') or die();
?>

<?php get_header();?>
<?php wp_enqueue_style('home', get_template_directory_uri() . '/assets/css/style.css', '', 1, 'all'); ?>

And in the header, its own CSS script like this right before wp_head():

...
    <title><?php wp_title();?></title>

    <?php wp_enqueue_style('header', get_template_directory_uri() . '/assets/css/header.css', '', 1, 'all'); ?>

    <?php wp_head();?>

</head>

<body <?php body_class();?>>

So this way a CSS file would be enqueued in the header.php and then another in that specific page.php. Is this the right approach for someone wishing to add page specific css?