Dependency injection in a custom class
DI requires a bit more effort than that - you haven't told the system about your class; the DI container doesn't know that you've called new MyClass(), and it can't get involved.

You need to create a Service, which you can make depend on other available services, instances of which will be passed to your class using the static create method pattern you're already using.

In this case, that's probably as simple as providing your mymodule.services.yml and adding:

my_service:
    class: Drupal\my_module\MyClass
    arguments: ['@file_system']


When you've correctly registered the class with the system, you'll get an instance of it like so (if you need it in a global function):

$foo = Drupal::service('my_service');


Or if you're consuming it in a container aware class, then you can inject it just like any other service.