Share the list .md file from the Notes folder via regular Nextcloud Files to user B
As user B, move the shared note file to the Notes folder in the Files app
And you have a shared note. The Notes folder refers to the folder containing the user's note files, not sure what the English name is.
Not sure how well concurrency is handled, as Notes doesn't really support sharing, but if it's for groceries, I doubt it's a frequent issue. Has been working well for 2 years now.
I use todo lists for groceries. So getting things setup on nextcloud and then mobile devices with any caldav compatible app is pretty easy. We have a couple shared lists.
You can use tasks.org for android and reminders for iOS.
It drives me crazy that notes does not reorganize the list when you check things, but that's probably because it's just markdown. My wife also refuses to use it. Carnet is the google keep like alternative that I think would work for me, but the sharing isn't working currently, whenever the note is updated the share is removed.