How to resolve my warning in my custom service?
You need to add an argument to your services.yml for the class to be injected:

services:
  custom_forms.custom_forms_service:
    class: Drupal\custom_forms\Service\CustomFormsService
    arguments:
      - @request_stack


Note that you should make a few changes to your service as well:

First, add an type hint for the argument:

public function __construct(\Symfony\Component\HttpFoundation\RequestStack $requestStack) {


Next, you will use the $requestStack instead of Drupal::request():

$this-&gt;cityname = $requestStack-&gt;getCurrentRequest()-&gt;query-&gt;get('cityname');