If you’re running python, you can use the pip package manager:
pip install matplotlib
from the command line. We’ve got other options at Installation — Matplotlib 3.4.2 documentation
If something there doesn’t make sense, please feel free to ask more detailed questions.