Seems images are better way to answer this question.
Feel free to ping in comments if more clarification required. Happy coding.
Right click on the pom -> maven -> unignore. Then right click on pom -> maven -> reload project.
Seems some kind of bug when you open a child subdirectory then open the parent in IntelliJ.
This is known issue and interlinked to 3 more IDEA issue. You can find more details here.
Indicate that pom.xml is ignored when editing it
Lot of us might spend more time and then end up deleting module & re-creating it. But @Pratik Ambani solutions works great!!, option 3 worked in my case.