The pom.xml file in idea turns gray and is ignored
It may be that a Module with the same name was created before creating a new Module.
And delete it, idea automatically thinks that this Module should be excluded
Solution:
we just need to go
File → Settings → Build,Execution,Deployment
→Ignored Files,
Just uncheck