Get post and its children with WP_Query

The question that is similar to your question, i took sample code from there. you can replace ‘post_parent with this.

global $post;
$args = [
    'wpse_include_parent' => true,
    'post_parent'         => wp_get_post_parent_id( $post->ID ),
    'post_type'           => 'post'
    // Add additional arguments
];
$q = new WP_Query( $args );

This code will get the parents post id when you are inside children post