When registering or updating any rewrite for any post/custom post type you need to flush rewrite rules by the admin panel or via code:
register_activation_hook( __FILE__, 'plugin_activation' );
function plugin_activation() {
update_option('plugin_permalinks_flushed', 0);
}
add_action( 'init', 'register_custom_post_type' );
function register_custom_post_type() {
global $wp;
register_post_type( 'review', array(
'label' => 'Reviews',
'labels' => array(
'name' => 'Reviews',
/* etc */
),
'description' => 'Tour reviews',
'menu_icon' => 'dashicons-format-chat',
'public' => true,
'supports' => array(
'title',
'revisions',
'author',
),
'has_archive' => false,
'show_in_rest' => true,
'rewrite' => array('slug' => 'reviews'),
));
if( !get_option('plugin_permalinks_flushed') ) {
flush_rewrite_rules(false);
update_option('plugin_permalinks_flushed', 1);
}
}
https://developer.wordpress.org/reference/functions/flush_rewrite_rules/