That is “sadly” not how Docker works. You have to use the currently running container and then create a new image from it. You can find some information about how that can e done here:
Anyway, that is still dirty. The best is to create a custom Docker image via a Dockerfile and use the n8n image as a base. Here is one of many examples in the forum where somebody does something like that: