There are several ways to optimize a Drupal website for SEO:
Use the Drupal SEO Checklist module: This module provides a checklist of SEO-related tasks that need to be completed, such as setting up your site's meta tags and creating a sitemap.
Use the Metatag module: This module allows you to set up and manage your site's meta tags, including title tags and descriptions.
Use the Pathauto module: This module automatically generates SEO-friendly URLs for your site's pages, based on the content's title.
Use the XML Sitemap module: This module generates an XML sitemap of your site, which can help search engines discover and index your site's pages.
Use the Redirect module: This module allows you to set up redirects for pages that have been moved or deleted, which can help prevent broken links and maintain your site's link juice.
Use the Google Analytics module: This module allows you to integrate your site with Google Analytics, so you can track your site's traffic and see which pages are performing well.
Use the SEO Checklist module: This module helps you to check your website against SEO best practices and to improve the website's SEO score.
Use structured data: Drupal 9 has built-in support for structured data (Schema.org) which allows you to mark up your content in a way that can help search engines understand what your content is about, and to display rich results in the search engine results pages (SERPs).
Optimize your images and videos: Make sure that all images and videos on your site are properly optimized, with descriptive file names and alt tags.
Optimize your page loading speed: Drupal 9 has built-in support for lazy loading images and videos which can help to improve your site's page loading speed.
It is important to keep in mind that SEO is an ongoing process, so it's crucial to regularly review and update your site to ensure that it's following the latest SEO best practices.