I am trying to install moodle 4.1, but there is a problem. every time I try in the "Confirm paths" step. There is always a message, that can be or
or "Data location is not secure"
Can anyone tell me which is the problem exactly and how can I solve it?

The dataroot folder needs to be either an existing folder that the webserver has write permissions or be within a folder where the webserver has write permissions to create it.
For security purposes, the folder must also not be one that is accessible via the internet - i.e. it must be outside of the folder where all the Moodle code is served from.
Exactly how you configure this will depend on your hosting arrangements - you may need to ask your web hosting provider for guidance on how to set this up.