Help to get all children of canvas in script

I want all the children of Canvas in the script and among them, I want to do some process of positioning. so how I will get all the children of Canvas or particular children of Canvas in type scripts @CocosMarketing

Just use node.children or node.getComponentsInChildren()