Displaying subcategories and then posts in taxonomy template

Please try this

<?php
$term = get_queried_object();
$term_id = $term->term_id;
$taxonomy_name = $term->taxonomy;

$termchildren = get_term_children( $term_id, $taxonomy_name );?>

  <?php foreach ( $termchildren as $child ) {
    $term = get_term_by( 'id', $child, $taxonomy_name ); ?>
    <li>
      <?php echo $term->name; ?>
        <?php echo $term->description; ?>
    </li>
    <?php }
if ( have_posts() ) :

    /* Start the Loop */
    while ( have_posts() ) : the_post();

        echo get_the_title($post->ID);


    endwhile;

        the_posts_pagination( array(
        'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '<span class="screen-reader-text">' . __( 'Previous page', 'twentyseventeen' ) . '</span>',
        'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'twentyseventeen' ) . '</span>' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ),
        'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyseventeen' ) . ' </span>',
        ) );
?>