How to get the post of category

    // Get the ID of a given category
    $category_id = get_cat_ID( 'Category Name' );

    // Get the URL of this category
    $category_link = get_category_link( $category_id );

<!-- Print a link to this category -->
<a href="<?php echo esc_url( $category_link ); ?>" title="Category Name">Category Name</a>

After you click on the Category Title link, it will take you to the page where it displays all the posts under that category. Note: category.php, archive.php template files are responsible for the display, else index.php will be used.