Preview suggested folders, change them, then apply. One undo puts the old grid back.
Start Organize
Open Settings › Layout › Organize…, or right-click empty space on the grid › Organize.
Preview and edit
Relaunch suggests folders. With Apple Intelligence it uses your Mac’s own model; otherwise it uses App Store categories.
Rename folders and move apps between them in the preview. Nothing changes on the grid yet.
Click apply when it looks right.
Undo
Press ⌘Z on the grid, or right-click empty space › Undo, to put the whole grid back in one step.
Sort instead
Sort apps in Settings › Layout puts every app and folder in order by Name, Date Added, Last Opened, Most Used or Icon Color, filling pages one after another. Folders keep their apps.