Custom Post Type permalink shows wrong page: homepage/index.php

post_type needs to be max. 20 characters, can not contain capital letters or spaces, in register_post_type(); function your post type name is capitalize Portfolio replace with lower letters portfolio

this is my register post type snippet, follow it

// add action register our post type portfolio
add_action( 'init', 'register_cpt_portfolio' );

// Register our Custom Post type as portfolio
function register_cpt_portfolio() {

    // labels text for our post type portfolio
    $labels = array(
        // post type general name
        'name' => __( 'Portfolio' ),
        // post type singular name
        'singular_name' => __( 'Portfolio Item' ),
        'add_new' => __( 'Add New Portfolio Item' ),
        'add_new_item' => __( 'Add New Portfolio Item' ),
        'edit_item' => __( 'Edit Portfolio Item' ),
        'new_item' => __( 'New Portfolio Item' ),
        'view_item' => __( 'View Portfolio Item' ),
        'search_items' => __( 'Search Portfolio Items' ),
        'not_found' =>  __( 'No Portfolio Items found' ),
        'not_found_in_trash' => __( 'No Portfolio Items found in Trash' ),
        'parent_item_colon' => '',
        'menu_name' => 'Portfolio'
    );

    $args = array(
        'labels' => $labels,
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'query_var' => true,
        'capability_type' => 'post',
        'hierarchical' => false,
        'has_archive' => true,
        'menu_position' => 5,
        'supports' => array( 'title', 'editor', 'thumbnail', 'author', ),
        'rewrite' => array( 'slug' => 'portfolio-item', 'with_front' => false )
    );  
    register_post_type( 'portfolio' , $args );
}