If you have an error that appears once or twice a day without any action by yourself and you do not know how it happened:
WordPress database error Duplicate entry 'https://xxx/xxx…' for key 'url' for query INSERT INTO wp_litespeed_url SET url='https://domain.com/page' made by shutdown_action_hook, do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, wp_ob_end_flush_all, ob_end_flush, LiteSpeed\Core->send_headers_force, apply_filters('litespeed_buffer_finalize'), WP_Hook->apply_filters, LiteSpeed\Optimize->finalize, LiteSpeed\Optimize->_optimize, LiteSpeed\Optimize->_build_hash_url, LiteSpeed\Optimizer->serve, LiteSpeed\Data->save_url
You can go to your phpMyAdmin -> this site database and run the following 2 queries from example below:
ALTER TABLE `wp_litespeed_url` DROP INDEX `url`;
CREATE INDEX `url` ON `wp_litespeed_url` (`url`);
and then see if the error still persists.