I am following the app development tutorial so when creating app and added it to my project I just enable it and it automatically appear in the header menu so How this happened?? and if I want to make my app visible in the admin area and invesible in the user area or vice versa how to make this ??and how to change my app icon place from header to another place??. Thanks in advance
It appears in the header because a navigation entry is registered, either via some php code or the info.xml.
Settings sections you can register via the info.xml as well. You can browser the apps inside the Nextcloud server checkout: server/info.xml at 1776b41ca8002d1b36d3e333cdb662d01c30b739 · nextcloud/server · GitHub
so what to do to make it invesible in user area and visible in admin dashboard?
See my linked code. It can be used for personal and admin settings.
More generally speaking if you want to understand the internals of Nextcloud then you’ll have to read lots of code. There is no way around that