How can i share WP_Query between multiple functions?

If you want to reduce code duplication, then extract the code into its own function, e.g.:

function get_xyz_query_args( ) : array {
    return array('post_type' => 'accomodation', 'posts_per_page' => 4, 'meta_query' => array('key' => 'accomodation_type', 'value' => get_query_var('accomodation_type')));
}

….

$args = get_xyz_query_args();
$q = new WP_Query( $args );

However, there is very little performance to be gained by recycling the WP_Query object, and potential losses if it’s done correctly. The complexity introduced would mean new bugs.

Since WP stores posts it fetches and post meta in WP_Cache, the second WP_Query only needs to fetch post IDs. On top of that, any caching plugin or object cache present can eliminate the database query completely.

So this is not worth doing if performance is your goal, there are better ways.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)