According to this article,
The functionality of saving a site as a template described in this article is only supported in SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 (classic sites only), and SharePoint Online (classic sites only).
It is not supported in SharePoint Online (modern sites) or SharePoint Server 2019 (modern sites).
It's convenient that you could use SharePoint Designer to "Save site as a template".
Per my knowledge, there is no alternative except for third-party tools.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.