I'm not sure where the confusion is?
any help will be appreciated
It has informed you running it as root is bad and given you a link to read for why it's bad.
The solution here is to not run as root.
Use a normal user to write to the directory (and give it write permissions) and it should get you past this step.
EDIT: to help you skip a link
Plugins and scripts have full access to the user account which runs Composer. For this reason, it is strongly advised to avoid running Composer as super-user/root.
composer is trying to protect you, listen to it.