The print widget in Experience Builder has a legend that can be turned on for your exported maps. However, it will not include grouped layers. This is a bug and should be fixed. We rely on grouped layers to organize data within our applications and our users that need to export maps expect to see all layers that are visible in the map represented in the legend.