WP IMPORTER is not working properly

The WP importer taken from WP no longer works since it requires wp 5+.
There is a fork that @viktor was making for WP (and the link is somewhere in this forum but for the life of me I am not able to find it), or you can use an outdated version of the plugin stating support for WP 4.9

Another solution might be WP all import plugin (supports WP 4.1 and above) that allows importing of the XML files in CP.