Here is the Code for the creating CPT (Custom Post Type ) & Taxonomy, By using this code you can create multiple CPT’s and Taxonomies as you want, No need to repeat the whole code just call the function and pass the parameters.
To create CPT call  framework_create_post_type()  function with different arguments within framework_core().
To create Taxonomy call framework_create_taxonomies() function with different arguments within framework_core().

Below cade creates “Property” Custom Post Type and “Property Category” Taxonomy  created/assigned to   “Property” CPT.


// *************** Create property CPT ****************
// Init Hook for the custom post type
add_action('init', 'framework_core');

function framework_core()
{
    framework_create_post_type('property','Property','Properties','property',['title', 'editor', 'thumbnail', 'excerpt'],'dashicons-admin-home');
    framework_create_taxonomies('property_catgory','property','Property Category','Property Categories','property_catgory');
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function framework_create_post_type($post_type, $singular_name, $plural_name, $slug, $support = ['title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'], $menu_icon)
{
    $labels = array(
        'name'               => _x($plural_name, 'post type general name', 'your-plugin-textdomain'),
        'singular_name'      => _x($singular_name, 'post type singular name', 'your-plugin-textdomain'),
        'menu_name'          => _x($plural_name, 'admin menu', 'your-plugin-textdomain'),
        'name_admin_bar'     => _x($singular_name, 'add new on admin bar', 'your-plugin-textdomain'),
        'add_new'            => _x('Add New', $post_type, 'your-plugin-textdomain'),
        'add_new_item'       => __('Add New ' . $singular_name, 'your-plugin-textdomain'),
        'new_item'           => __('New ' . $singular_name, 'your-plugin-textdomain'),
        'edit_item'          => __('Edit ' . $singular_name, 'your-plugin-textdomain'),
        'view_item'          => __('View ' . $singular_name, 'your-plugin-textdomain'),
        'all_items'          => __('All ' . $plural_name, 'your-plugin-textdomain'),
        'search_items'       => __('Search ' . $singular_name . 's', 'your-plugin-textdomain'),
        'parent_item_colon'  => __('Parent ' . $singular_name . ':', 'your-plugin-textdomain'),
        'not_found'          => __('No ' . $singular_name . ' found.', 'your-plugin-textdomain'),
        'not_found_in_trash' => __('No ' . $singular_name . ' found in Trash.', 'your-plugin-textdomain'),
    );
    $args = array(
        'labels'             => $labels,
        'description'        => __('Description.', 'your-plugin-textdomain'),
        'public'             => ($post_type === 'process') ? false : true,
        'publicly_queryable' => true,
        'show_ui'            => true,
        'show_in_menu'       => true,
        'query_var'          => true,
        'rewrite'            => ($post_type === 'process') ? false : array('slug' => $slug),
        'capability_type'    => 'post',
        'has_archive'        => true,
        'hierarchical'       => false,
        'menu_position'      => null,
        'menu_icon'          => $menu_icon,
        'supports'           => $support,
    );
    register_post_type($post_type, $args);
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function framework_create_taxonomies($taxonomy_name, $post_type, $singular_name, $plural_name, $slug)
{
    $labels = array(
        'name'              => _x($plural_name, 'taxonomy general name', 'textdomain'),
        'singular_name'     => _x($singular_name, 'taxonomy singular name', 'textdomain'),
        'search_items'      => __('Search ' . $plural_name, 'textdomain'),
        'all_items'         => __('All ' . $plural_name, 'textdomain'),
        'parent_item'       => __('Parent ' . $singular_name, 'textdomain'),
        'parent_item_colon' => __('Parent ' . $singular_name . ':', 'textdomain'),
        'edit_item'         => __('Edit ' . $singular_name, 'textdomain'),
        'update_item'       => __('Update ' . $singular_name, 'textdomain'),
        'add_new_item'      => __('Add New ' . $singular_name, 'textdomain'),
        'new_item_name'     => __('New ' . $singular_name . ' Name', 'textdomain'),
        'menu_name'         => __($singular_name, 'textdomain'),
    );
    $args = array(
        'hierarchical'      => true,
        'labels'            => $labels,
        'show_ui'           => true,
        'show_admin_column' => true,
        'query_var'         => true,
        'rewrite'           => array('slug' => $slug),
    );
    register_taxonomy($taxonomy_name, array($post_type), $args);
}