I have a view and same in D7 and same I created in Drupal 10 but the output is not as expected. I found in Drupal 10 we don't have Filter Value type in Drupal 10
Below is the Drupal 7 view query:
SELECT node.sticky AS node_sticky, node.created AS node_created, node.nid AS nid
FROM node WHERE (( (node.status = 1 OR (node.uid = 96 AND 96 <> 0 AND 1 = 1) OR 1 = 1) AND (node.nid IN (SELECT tn.nid AS nid
FROM
taxonomy_index tn
WHERE ( (tn.tid = 'Passed numeric value of taxonomy term') ))) ))
ORDER BY node_sticky DESC, node_created DESC;
Drupal 10 View query
SELECT "taxonomy_index"."sticky" AS "taxonomy_index_sticky", "node_field_data"."created" AS "node_field_data_created", "node_field_data"."nid" AS "nid"
FROM
{node_field_data} "node_field_data"
INNER JOIN (SELECT "tn"."nid" AS "nid"
FROM
{taxonomy_index} "tn"
WHERE "tn"."tid" IN ('6') UNION SELECT "tn"."nid" AS "nid"
FROM
{taxonomy_index} "tn"
INNER JOIN {taxonomy_term__parent} "th1" ON [tn].[tid] = [th1]. [parent_target_id]
WHERE "th1"."entity_id" IN ('Passed numeric value of taxonomy term') UNION SELECT "tn"."nid" AS "nid"
FROM
{taxonomy_index} "tn"
INNER JOIN {taxonomy_term__parent} "th1" ON [tn].[tid] = [th1]. [parent_target_id]
INNER JOIN {taxonomy_term__parent} "th0" ON [th1].[entity_id] = [th0].[parent_target_id]
WHERE "th0"."entity_id" IN ('6')) "taxonomy_index_depth" ON node_field_data.nid = taxonomy_index_depth.nid
LEFT JOIN {taxonomy_index} "taxonomy_index" ON node_field_data.nid = taxonomy_index.nid
WHERE (node_field_data.status = 1 OR (node_field_data.uid = 98 AND 98 <> 0 AND 1 = 1) OR 1 = 1)
ORDER BY "taxonomy_index_sticky" DESC, "node_field_data_created" DESC
LIMIT 10 OFFSET 0