The single most important pip habit is never install packages globally. Always work inside a virtual environment (venv) per project. The four commands you'll type most are venv setup, install, freeze, and run.
python3 -m venv .venv creates a virtual environment in a .venv directory. source .venv/bin/activate activates it — your shell prompt prefixes with (.venv) and which python now points inside the venv. deactivate exits.
Inside the venv: pip install <pkg> installs a package into this venv only. pip install -r requirements.txt installs from a requirements file. pip install -e . does an editable install of the current directory — changes to source code take effect immediately, the standard way to develop a Python package.
pip freeze outputs every installed package in name==version format — the closest pip gets to a lockfile. Redirect to requirements.txt to capture your environment. pip list shows installed packages in a table format. pip show <pkg> shows version, install location, dependencies, and homepage for one package. pip uninstall <pkg> removes one (but does NOT remove its now-orphaned dependencies — that's pip's dirty-uninstall problem).