XAMPP and mysql on macbook M1

  bash, macos, mysql, php, xampp

I have recently bought a macbook for a first time in my life and I want to have XAMPP installed, but after I have downloaded it I cannot use any shell commands like mysql -p root -u returns that zsh command not found, I have found several articles and threads here and after lecture I have modified my ~./bash_profile file which now looks like

export XAMPP_HOME=/Applications/XAMPP
export PATH=${XAMPP_HOME}/bin:${PATH}
export PATH="~/.composer/vendor/bin:$PATH"
export PATH

but still the command mysql -p root -u does not work unless I type source `/.bash_profile, and I have to do it all the time, and when I type show databases it returns nothing, although there were a couple of databases pre created by XAMPP.
I am not yet a power user, but I am learning to become one, so if someone could decipher what I have done in mine ~./bash_profile so that I understand it and why do I need to type this source command every time to make it not even work but recognize the command that would be great normally when I type which php I get /usr/bin/php, but after I type source ~/.bash_profile I get /Applications/XAMPP/bin/php.
Many thanks in advance and all the best!

Source: Ask PHP