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
- How to create a custom page programmatically in Drupal 8
- How to apply Drupal Patch
- how to Programmatically update an entity reference field in Drupal 8 & 9
- change canonical URL in drupal 8 & 9
- How to get the address / url / uri of a file from a File entity in drupal?