pre_get_posts in your child themes functions file is the best in my opinion.
add_action( 'pre_get_posts', 'wpsites_custom_get_posts' );
function wpsites_custom_get_posts( $query ) {
if( $query->is_main_query() && $query->is_home() ) {
$query->set( 'cat', '-182,-184' );
$query->set( 'posts_per_page', '12' );
$query->set( 'orderby', 'RAND' );
}
}
This method is more flexible in my opinion.