.htaccess Removing the folder name in URL

I want to remove these unnecessary names from my link

domain.com/user/profile/12/jhgH
domain.com/sec/setting/11/yjutg
domain.com/policy/privcy/10/help

in this way

`domain.com/12/jhgH
domain.com/11/yjutg
domain.com/10/help`

I have used this code and it has been successful

RewriteRule ^use/([0-9]+)/(.*)$ /user/profile/$1/$2 [L]
RewriteRule ^([0-9]+)/(.*)$ /sec/setting/$1/$2 [L]
RewriteRule ^([0-9]+)/(.*)$ /policy/privcy/$1/$2 [L]

But only the first and second work, the third does not

RewriteCond %{REQUEST_URI} ^/policy/
RewriteRule ^([0-9]+)/(.*)$ /policy/privcy/$1/$2 [L]

If I bring the third code, the first one works, but the third code doesn’t work
So I tried to change the law to this one
But it didn’t work either
Is there any way I can fix this problem