Issue with docker init

when I am trying to run the docker init it’s just not letting me select the sub-options but skipping those parts and directly throwing an error ERROR: Incorrect function.
NOTE: my docker desktop is running.

$ docker --version
Docker version 24.0.6, build ed223bc

Any help will be highly appreciated.