Automatically add custom CSS to new posts using a category template

If you have created a custom php template then add a specific class selector to your css within this template. As an example:

<body class="mycustomclass">all your page content</body>

or

<content class="mycustomclass">all your content content</content>

It doesn’t have to be on body or content or any other specific part of the page but make it encompass a the largest part of the content of that page.

Now in your child theme’s style.css add the customization that you want:

.mycustomclass {
    color: blue
}

.mycustomclass h2 {
    font-size: 3rem;
}

This is a general answer but hopefully puts you in the right direction.