Ideally you should write your own CSS rules ina separate file to override default theme CSS rules and enqueue it through your theme’s functions.php
file.
For example you create your own CSS rules in a file called ‘my-custom.css’. Then you need to put it like this in functions.php
:
function add_custom_resources(){
wp_enqueue_style('my-custom', get_stylesheet_uri(), array(), mt_rand(), 'all');
}
add_action('wp_enqueue_scripts', 'add_custom_resources');
This will ensure that even you update the theme your overridden rules will not get affected still remain in your custom style sheet.
Hope this helps.