The title says it all, how can I achieve that using scripts?
This feature is currently in beta, but the applications closed a while back. (https://devforum.roblox.com/t/new-in-experience-csg-api-sign-up/2320036)
So yeah, unless you make your own system for it, it is currently not possible until the feature is out of beta and is public.
I’m guessing you want to do this in game.
Does this mean you want to divide a rectangular (or square) Part into smaller rectangles, or do you want it to be cut along an angled line?