add style from wp function file code example
Example 1: function for style your theme wordpress
function register_styles() {
wp_register_style( 'theme_styles', get_template_directory_uri() . '/styles/main_global.css' );
wp_enqueue_style( 'theme_styles' );
}
Example 2: how to add css file in wordpress
wp_enqueue_style( 'style', get_stylesheet_uri() );