Redirecting all subdirectories of a folder via htaccess

This question already has an answer here:

I looked around and I did not find that specific question asked.

I need to redirect all the "subfolders" of a directory in the parent directory.

For example, the parent directory is example.tld / directory and all subdirectories such as example.tld / directory / subdirectory-1 summerxample.tld / directory / subdirectory-2 etc all need to redirect to example.tld / directory

For more precision, these are not directories but Drupal subpaths, but I think it should work with htaccess.

For it to be perfectly clear, the URLs

example.tld / directory / subdirectory-1

example.tld / directory / subdirectory-2

etc …

should all redirect to

example.tld / directory

The idea is to make these subdirectories inaccessible to anyone and to ensure that crawlers do not index these subdirectories.

What would be the appropriate htaccess code to achieve this?