To create a proximity search in PubMed, enter terms using the following format:
"search terms"[field:~N]
Search terms = Two or more words enclosed in double quotes.
Field = The search field tag for the [Title] or [Title/Abstract] fields.
N = The maximum number of words that may appear between your search terms.
Source: PubMed Update: Proximity Search Now Available in PubMed. Date: 2022 November 29. https://www.nlm.nih.gov/pubs/techbull/nd22/nd22_pubmed_proximity_search_available.html