You must learn to describe your problems properly:
1) Xampp is a distribution of many tools (Apache is only one of these) and you cannot simply install Apache only. You also cannot de-install Apache only. Therefore, please explain precisely what you did, you did not uninstall Apache only. What exactly did you do?
2) Please use correct names, in your last posting you say "Local host/foldername", what of course cannot work, as "Local host" is unknown, it must be "localhost".
3) Never ever say "does not work". That is a totally useless bunch of words which does not help us in any way to understand, what is going wrong. The most errors are coming with a qualified error message and a certain behaviour, please provide the error message (completely!) and describe the behaviour. As long as you say "does not work", as long nobody can help you.
4) Xampp is NOT configured to show up foldernames of subfolders in htdocs (who says so??), instead if you enter
http://localhost in your browser, Xampp shows up a so called "dashboard" (a kind of welcome page). It does NOT show files and filenames of htdocs. If you would like to have such behaviour (but i cannot see any use for it), you have to change some things, but "out of the box" Xampp does not behave in that way.
5) Dont trust and follow to outdatet tutorials. There are plenty of old and incorrect tutorials out there in the WWW. Instead look into the Xampp FAQ , for Windows it is
https://www.apachefriends.org/faq_windows.html