Hi Babiker Assie,
You can have the contents of your aspx pages in search results but there is some limitations with Azure cognitive Search and SharePoint Indexer such Indexing SharePoint .ASPX site content.
So I suggest you to use a Power Automate process to convert your aspx pages within the same document library or on other place.
You will found steps in this post https://sharepointstuff.com/2022/06/15/convert-sharepoint-pages-into-pdf/comment-page-1/
Best regards,
IM
#Azure #cognitive #AI #Copilote