See the code sample here.

add_action('post_grid_before_loop', 'post_grid_before_loop_20200614', 10);

function post_grid_before_loop_20200614($args){
    $grid_id = $args['grid_id'];
    $post_grid_options = $args['options'];
    ?>
    <div class="">Custom HTML here</div>
    <?php
}

 

View post on imgur.com