There is no ability for grouping layer in AGOL using the Map Viewer. In the help docs you will only find these capabilities for organizing layers: Organize layers—ArcGIS Online Help | ArcGIS
The only option you have is to group layer in ArcMap and publish the service to ArcGIS Server.
That help document is referring to Online Scene maps, not the normal webmaps. The table of contents for the document states "Create Scenes"
I really hope the layer group functionality gets added to the webmaps soon.