From the error message, it is obvious that you do not have permission to update "/usr/local/lib/python3.6/site-packages/pip-21.3.1.dist-info" file. However, you can upgrade pip for your userid by running the following command on the terminal.
python3 -m pip install --upgrade pip --user