When you create the widget, it uses whatever settings are currently in use in the app. That includes lua scripts. You can also edit it afterward. I'm a little unsure of where your confusion is, because it is quite easy to try and make two widgets and test for yourself whether it works
elmussol:elsmussols.net @elmussol:elsmussols.net notes the appearance of Simpletask Nextcloud in F-droid today. I have up until this point been using Simpletask Cloudless and having Nextcloud keeping todo.txt and done.txt autouploaded from a monitored directory.