PHP interpreters in PhpStorm only affect PhpStorm itself, they don't modify the system environment. If you want to change the PHP version in the terminal, you should change your environment accordingly. The way you can do that depend on the OS you use and on the method you installed PHP with.
If it's Windows (at least it looks like it), you need to add the directory where the XAMPP's php.exe is located to the $PATH variable, and make sure no other $PATH entry overrides it.
PHP interpreters in PhpStorm only affect PhpStorm itself, they don't modify the system environment.
If you want to change the PHP version in the terminal, you should change your environment accordingly. The way you can do that depend on the OS you use and on the method you installed PHP with.
If it's Windows (at least it looks like it), you need to add the directory where the XAMPP's php.exe is located to the $PATH variable, and make sure no other $PATH entry overrides it.