I think you need to declare the bootstrap
dependency when you enqueue the parent stylesheet (bootstrap.css is enqueued by the parent theme).
The parent theme doesn’t declare the dependency but enqueues style.css after bootstrap.css, so it “just” works. But when you change the order of the enqueue, the dependencies are broken. Use the third parameter of wp_eneuque_style()
to declare dependencies and WordPress will take care of the order, not matter the order in the code.
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
wp_enqueue_style(
'nisarg', // Handler/key
get_parent_theme_file_uri( 'style.css' ), // URL
['bootstrap'] // Dependencies (bootstrap is enqueued by parent them)
);
wp_enqueue_style(
'nisarg-child-style', // Handler/key
get_stylesheet_uri(), // URL
['nisarg'], // Dependencies
wp_get_theme()->get('Version') // version
);
}