LayoutUtil: Automatically sizes a ScrollingFrame's UIGridLayout/UIListLayout

I’m a bit unsure how to use the code here and what I need to do because
I used

layoutUtil(script.Parent.UiGridLayout)

and set the automatic canvas size to Y yet it’s not doing anything
anyone got an answer?