I have my tasks.org set to CalDAV sync, then using my Nextcloud info as normal for the credentials with Nextcloud selected as server type. I've found that owncloud also works just as well for that setting. That along with the CalDAV address should be it for the Tasks.org app itself. I believe you'll also need the DAVx5 app to sync the CalDAV info this way, but it seemed to work better for me than the straight up Nextcloud connection.
I have 2 way sync working successfully in Nextcloud & Tasks.org, but without knowing how you configured it I'm not sure what to suggest.
Set up a CalDav account using this format, your Nextcloud user password, and select Nextcloud as the server type.
https:///remote.php/dav/calendars//
Substitute http if not using an SSL certificate.
Just double checked to make sure I have it set that way. What is weird is that it can apparently sync marking a task complete back to NC. Just can't get a task created in the phone app to show up in NC.
Not sure what else to suggest. Make sure that the task app is set to use your Nextcloud list by default? Normally it defaults to a local list. This is edited in the task defaults in settings.
Found the issue!
In order to have tasks created outside of NC tasks appear in NC, the category needs to be set as Tasks. At least I think that's what the menu item is called. I've included a screenshot and until now didn't notice that the categories I created in Tasks.org are under a "local lists" heading. No wonder they don't sync. Seems like there should be a way to still set categories and have 2-way sync, but for now this is a working solution for me.
Free and Open Source Software
If it's free and open source and it's also software, it can be discussed here. Subcommunity of Technology.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.