There are some tricks to getting this working: using the wrong CalDAV URL, username, password, sync tool, or version can cause a lot of frustration. Here's what worked for me here in 2021.
Just use the default Thunderbird wizard to add a new email account. Use your normal login password, even if you've got 2FA set up. (Apparently app passwords don't work for IMAP/SMTP.)
First, if you have 2FA set up for Nextcloud, create an App Password for Thunderbird at: /settings/user/security
under Devices & Session. Normal passwords will fail with an error like this if you try to use your regular password on an account with two factor authentication enabled.