YML files should not be accessible

I am getting this error in the diagnostics report. How can I solve this issue?

Would adding the below to my htaccess fix this issue? As I added it to the root level .htaccess but I still see the error.

RewriteRule ^wp-content/plugins/matomo/app/vendor/.*.yml$ - [F,L,NC]

Hi @mrmr
Did you have a look at:

./console core:create-security-files