On the webpage https://www.python.org/downloads/, I clicked the “Download Python Installer” button, which downloaded the file python-manager-25.2.msix.

After executing python-manager-25.2.msix, I received the following message:
The legacy 'py' command is still installed.
For this reason, I selected "N" (do not install).

After that, I received the following message:

The global shortcuts directory is not configured.

Configuring this enables commands like python3.14.exe to run from your
terminal, but is not needed for the python or py commands (for example, py
-V:3.14).

We can add the directory (C:\Users\user\AppData\Local\Python\bin) to PATH
now, but you will need to restart your terminal to use it. The entry will be
removed if you run py uninstall --purge, or else you can remove it manually when
uninstalling Python.
Add commands directory to your PATH now? [y/N]
At this prompt, I selected "y".

In the next step, I received the following message:

PATH has been updated, and will take effect after opening a new terminal.

********************************************************************************

You do not have the latest Python runtime.

Install the current latest version of CPython? If not, you can use 'py install
default' later to install.

Install CPython now? [Y/n]
At this prompt, I pressed "Y".

To verify that Python was installed successfully, I executed the following commands:

python --version
pip --version
The output was as follows:
PS C:\Users\user> python --version
Python 3.13.5
PS C:\Users\user> pip --version
pip 25.1.1 from C:\Python313\Lib\site-packages\pip (python 3.13)
PS C:\Users\user>