For some reason the search function was off for the document library. I had used a site template before all the modern changes so not sure if that was related. Here are the steps to turn the search on.

Go to the SharePoint page in question
click the Gear in the upper right corner and go to Site contents:

Click the … next to the document library name and go to Settings:

Under General click Advanced Settings:

Scroll down and select Yes to allow items to appear in search results

Click Reindex Document Library (may have to click again)

Then scroll to the bottom and click OK