Medical Subject Headings (MeSH) are:
Automatic Term Mapping
When you do a basic keyword search, PubMed returns articles with those terms, but also automatically maps your search terms to the MeSH that are used to index articles. The search results include the keywords and the MeSH term(s). This is one way to find relevant MeSH. You can also explore the MeSH database directly https://www.ncbi.nlm.nih.gov/mesh.
Which should I use?
The simple answer to the question of whether you should use keywords or subject headings is: it depends. Some basic guidelines are:
Information above provided by Clarkson University: https://sites.clarkson.edu/library/wp-content/uploads/sites/27/2021/01/Pubmed-keyword-vs-MeSH-1.pdf