UnityServices.InitializeAsync failed when switch from Mono to IL2CPP scripting backend.

I’d first remove any packages you don’t actually need, and also clear the package cache, then reimport all.

If it still doesn’t work, make a blank empty project, import the packages you want and try to build them for IL2CPP.

If THAT doesn’t build, open a bug report (Help → Report A Bug) from that empty project.

If that DOES work, then bisect from the empty project to your project to see what’s wrong.

Extra unwanted packages in new projects (collab, testing, rider and other junk):

About the fastest way I have found to make a project and avoid all this noise is to create the project, then as soon as you see the files appear, FORCE-STOP (hard-kill) Unity (with the Activity Manager or Task Manager), then go hand-edit the Packages/manifest.json file as outlined in the above post, then reopen Unity.

Sometimes the package system gets borked from all this unnecessary churn and requires the package cache to be cleared: