You cannot do that. ERPNext is a monolith and hence all the modules are available from the get go.
You can restrict the access of the users to all other modules from
- User Settings:
- Role Permission Manager:
Do not give any user Read permissions on any of the doctypes which are not not supposed to be accessed.
Also, when you select your business domain at the beginning you already cannot access modules belonging to other domains.