How to pass parameters to a plugin during apply?

Sorry, I am pretty new to gradle and I think I did not get your idea.

Assuming I have my own configuration, like this:

class MyPlugin implements Plugin<Project> {

      void apply(Project project) {
        project.configurations {
            myConf
        }
        
        project.dependencies {
          myConf 'some.dependency:something-useful:1.0.0:classes'
        }
        project.task("myTask") {
            ...
        }
        ...
    }

How exactly does this help me? How can I modify my dependency from my build.gradle?

I got the idea of default dependencies, but I would not like to force my build.gradle to declare the dependency itself, but rather only pass the version.

If you could provide some code snippets or point me to some example, that would be highly appreciated.

Cheers,
Stefan