If you want to upgrade or downgrade to different version of pip, you can do it in multiple ways.
To go back to particular version, use below command
python -m pip install pip==23.1.2
If you want to upgrade or downgrade using single command, use below command with specific version
python -m pip install --upgrade pip==23.1.2
If you want to upgrade to latest version, use below command
python -m pip install --upgrade pip
Hope this helps!!