How to organize priority of plugins CSS files?

I came across this at https://wordpress.org/support/topic/zerif-lite-child-theme/?replies=23#post-7476423

It appears that WordPress add_action will allow you to set priority as an integer.

add_action( string $tag, callable $function_to_add, int $priority = 10, int $accepted_args = 1 )

By adding the “wp_enqueue_styles” or “wp_enqueue_scripts” as an action method you can set the priority of the styles. It’s a bit of a hack because you have to load every script using a different function but this should work.

<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 99 );
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}