The auto-apply is for the preset. The Lua script has to be installed first. There is a script manager / installer which is normally shown when you start darktable for the first time. If you don’t see it, check your preferences:
https://docs.darktable.org/usermanual/3.8/en/preferences-settings/lua-options/
The tool itself is documented here:
https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/tools/script_manager/
I don’t use Lua scripts, so won’t be able to help more.