I'm using Magento 2.4.2, when changing the categories URL keys in the admin panel the URL rewrite sometimes isn't updated.
Why would it happen and how can I update them?
There might be multiple reasons for the same problem. But anyway, you might solve it by installing olegkoval/magento2-regenerate-url-rewrites and running these commands below.
php bin/magento ok:urlrewrites:regenerate --entity-type=category
php bin/magento index:reindex
Note: Before performing this please backup your database and commit your current code.