I am using below script to create OOTB groups(member,visitor,owner) through SP PnP js in SharePoint Online.
(async () => {
const owner1 = "i:0#.f|membership|Username@<tenant>.onmicrosoft.com";
const copyRoleAssignments = false;
const clearSubScopes = true;
const ootbgroupCreation = await sp.web.createDefaultAssociatedGroups("Site Title",owner1,copyRoleAssignments,clearSubScopes);
})().catch(console.log)