Entra Access Packages are an M365 feature that essentially bundles together M365 resources into a single assignable object that users can then be assigned.
Essentially all groups, SharePoint sites, enterprise applications and other things all get applied to the users account when they are assigned to the Access Package. Then when offboarding the user, you remove the Access Package, and they are removed from all of those resources.
Would involve at least 2 Graph calls, one to list the available Access Packages which I imagine could be an option generator. Then another to assign the userID that we would already have to the Access Package(s) that have been selected.