If you are using MySQL 8 and above you can use REGEXP_REPLACE,
e.i.
UPDATE `wp_posts`
SET post_content=REGEXP_REPLACE(post_content, 'domain.tld\/[0-9]{4}\/[0-9]{2}\/[0-9]{2}\/', 'domain.tld/')
WHERE post_content REGEXP 'domain.tld\/[0-9]{4}\/[0-9]{2}\/[0-9]{2}\/';
this would look for exact match domain.tld/{4 digit int}/{2 digit int}/{2 digit int}/
then replace it with domain.tld/
so it will replace something like domain.tld/2000/01/01/my-cool-post/
to domain.tld/my-cool-post/
Another option if you cannot do it via direct SQL query;
you can query and loop through each post, then update the post_content
using preg_replace
e.i
$new_post_content = preg_replace('/domain.tld\/\d{4}\/\d{2}\/\d{2}\//', 'domain.tld/', $old_post_content );
This would do the same exact match and replace as the sql query
P.S.
DO NOT forget to backup your database before doing anything, or play in a local/staging environment