When creating your own service, the first step is to declare it to the system through your module's {module}.services.yml file. Imagine that we wanted to create a new block to display information from the Weather Underground's API. We could put all of the logic to connect to their API within the block itself, but that would defeat the purpose of modularity. So, first, we have to create a Weather Underground service.
This is another job for the Drupal Console. Run drupal generate:service and start answering some prompts.
