How to create a Custom REST API using a Controller in Drupal 9

If you are new to Drupal 9 and wondering how to create a simple REST API, this is the right place to learn about it. You can create a REST API in multiple ways, but the one I am going …