Child pages and sub-pages do not appear. Why?

You need to check if the page have parent to display the child page template or if he doesnt have to display the parent page template. If $post->post_parent is equal to 0 thats mean that he doesnt have a parent.

while ( have_posts() ) : the_post();
    $template = ($post->post_parent == 0) ? 'page' : 'child-page';
    get_template_part( 'template-parts/page/content' , $template );
endwhile; // End of the loop.