Error: "sudo: command not found" when trying to use XAMPP
Idea #1

The error could be because it's attempting to run this command:

$ sudo /Applications/XAMPP/xamppfiles/xampp


You may need to pass the entire command with single or double quotes to the sudo command like this:

$ sudo '/Applications/XAMPP/xamppfiles/xampp security'


Idea #2

If the above isn't your issue then I'd suggest changing directories and running the command directly from there:

$ cd /Applications/XAMPP/xamppfiles
$ sudo xampp security


Idea #3

If that still doesn't work, take a look at the contents of the xamppfiles directory using the ls command and verify that xampp is in fact a file in this subdirectory. It it's missing then one of your steps to install XAMPP was either skipped or failed.