But it’s not helping me
Somewhere there's a list of Phrases We Never Want To See in the apache subforums ;) Others include "it doesn't work" and "no joy". What, exactly, happens? ("Nothing at all happens" is a valid answer.)
Put a blank line after each RewriteRule so people coming along later-- including readers of this forum, and also yourself next year when you need to tweak the rule-- can see where one ruleset ends and another begins.
Constrain the body of the rule to the actual path that originally held the query string, like /products/ or /categories.php. (It's your site, so you know what the possibilities are.) Since you are rewriting to a different format than the old one, you don't need %{THE_REQUEST}, just %{QUERY_STRING}. This, in turn, makes the Condition easier to set up.
Put all external redirects before all internal rewrites unless there is a specific reason to put a rule in the "wrong" place. There shouldn't be any need for QSA, since the whole point was to
remove the old query string from all requests, so there shouldn't be one at all. (And if for some reason there is one, it's reappended by default if you don't say anything to the contrary.) There is also no need for NC-- and it makes more work for the server, so omit it.
category=([^\s&]+)&parent_id=([^\s&]+)
You can eliminate the \s since that was only needed when looking at the whole request. Once you're looking at the query string alone, there will be no spaces and it's a simple [^&]+
Are "category" and "parent_id" always the first two parameters in your old-style URLs with query? Or, at least, are they always adjacent? Once you're looking at %{QUERY_STRING} alone, you can omit the closing anchor, so it won't matter if some URLs have other stuff like "sort order" tacked on to the end. The rule will still be more efficient if you can use a ^ opening anchor.
RewriteCond %{QUERY_STRING} ^category=([^&]+)&parent_id=([^&]+)
Is there any possibility of empty parameters, such as "category=&parentid=" ? If yes, you'll need to figure out how to redirect them. If it doesn't occur, you may not need to worry about it.
Now, about the rewrite-- the rule you currently have first, but it needs to go second:
RewriteRule ^products/([a-zA-Z0-9-_%/,]+)/([a-zA-Z0-9-_%/,]+)/?$ categories.php?category=$1&parent_id=$2 [L,QSA]
What the heck are those % percent signs doing in the URL? They can only be an artifact of percent-encoding stuff in the old query string. If your old queries did contain non-ASCII characters that needed to be encoded, and for some reason they didn't get disencoded, you'll need some supplementary business to process them before they go into the URL. If the object was to make shorter prettier URLs, you won't achieve that by littering the path with percent signs. Also commas? Really?
In any case the whole package [[a-zA-Z0-9_] (alphanumerics plus lowline but not hyphen) can be expressed as \w which also includes any non-ASCII letters such as é or ü if you've got them. Or you could just say [^/]+ the same way you do in capturing from a query.
Don't have an optional / at the end. Otherwise you've created Duplicate Content all over the site, because search engines
will ask for URLs with trailing slash any time they see one without. (And vice versa.) If you've chosen to go extensionless,
redirect any requests that do have a final / slash.