module controller does not respond! I'm trying to create a controller within my custom module, but the controller still doesn't response when visiting the associated path.

Here are my files:

my_module/my_module.routing.yml:

my_module.agreement:
  path: 'my_module/send_consent'
  defaults:
    _controller: '\Drupal\my_module\Controller\MyModuleController::check_agreement'
    _title: 'Agreement controller'
  methods:  [GET]


my_module/src/Controller/MyModuleController.php :

namespace Drupal\my_module\Controller;


use Drupal\Core\Controller\ControllerBase;

class MyModuleController extends ControllerBase {

    public function check_agreement() {
        die('hello from controller');
    }
}


To test I visit myproject.local/my_module/send_consent

Any help?
You forgot requirements (which is required):

my_module.agreement:
  path: 'my_module/send_consent'
  defaults:
    _controller: '\Drupal\my_module\Controller\MyModuleController::check_agreement'
    _title: 'Agreement controller'
  methods:  [GET]
  requirements:
    _permission: 'access content'


See Structure of roots for full details.