WordPress category of CPT pagination page 2 ERROR

I got problem of my pagination in category pages >>
I made a category taxonomy for my CPT and when I add posts and posts goes to page 2 .. the page 2 got a ERROR not found


 <?php 
                  //==== Query Dynamic Options ====//
              
                  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
                  $args = array(
                    'post_type' => 'portfolio',
                    'post_status' => 'publish',
                    'posts_per_page' => 9,
                    'paged' => $paged,
                    'order' => 'DESC',
                    'orderby' => 'ID',
                    'taxonomies' => 'portfolio-categories'
           
                );
                $the_query = new WP_Query( $args );
            ```
 if you wanna see more code that will helps u to help me ask it for me I will capture it