Either generate a custom XML sitemap for your site or use a package like spatie/laravel-sitemap along with caching.
I would suggest looking into leveraging sitemap indexes as there is a limit to a sitemap.
Google Sitemap guidelines suggest you break up large sitemaps into smaller sitmaps as a single sitemap can contain up to 50k URLs and must not exceed 50MB uncompressed. As a solution use a sitemap index file to list all the individual sitemaps and submit this single file to Google rather than submitting individual sitemaps.
More general sitemap guidelines at https://developers.google.com/search/docs/advanced/sitemaps/build-sitemap