Are there any specific guidelines or recommendations for using wp_enqueue_style in PHP scripts?

When using wp_enqueue_style in PHP scripts, it is recommended to properly enqueue stylesheets to ensure they are loaded in the correct order and only when needed. It is important to specify dependencies, version numbers, and media types when enqueuing styles to prevent conflicts and ensure compatibility with other plugins or themes.

// Enqueue a stylesheet in WordPress
function enqueue_custom_styles() {
    wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/css/custom-style.css', array(), '1.0', 'all' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_custom_styles' );