I have a SharePoint 2016 site collection running with no problems without the search doesn't retrieve any aspx pages content in the search result.
Regards
Ashraf
Go to Site settings -> Search Result Sources under Site Collection Administration -> Check whether you choose Local SharePoint results.
Edit Search Result page. Edit Search Results web part. Check in query bulider if you have -FileType:aspx
in query.
-FileType:aspx
will not return aspx page in results. If you have this in your query you need to remove it to see aspx pages in search results.
For more description see this link. https://metashare.com/en/app/help/adminmanual/how-to-create-a-custom-search-results-page/#gsc.tab=0