To make modules and themes compatibe with drupal 8 & 9 just add the following code to your .info.yml file:
core: 8.x core_version_requirement: ^8 || ^9
Similar Posts:
- How to create a custom page programmatically in Drupal 8
- How to apply Drupal Patch
- change canonical URL in drupal 8 & 9
- how to Programmatically update an entity reference field in Drupal 8 & 9
- create media entities and attach them to paragraphs in Drupal 8 & 9
608