You would notice Cucumber Selenium project has step definitions and hooks classes. Cucumber options glueing these step definitions and hooks to generate class instances using dependency injections before each Scenario
What is dependency injection?
Dependency injection is a design pattern where an object or function can receive other object or function.
In java you would notice constructor injection and setter injection. Spring projects are example using dependency