These are known as "Sitelinks" - they are automatically created by search engines and website authors have very little control over them.
https://developers.google.com/search/docs/appearance/sitelinks
I recommend following SvelteKit's general recommendations for improving SEO, as well as following recommendations for improving Sitelink SEO that would work for any web framework.
If your website ranks #1 on any search engine for a specific query, you can expect that the search engine will create & manage Sitelinks for you automatically.