No you do not need to update Nintex when updating SharePoint.
If you haven't patched since 2018 you need to be aware of this patch that breaks the SharePoint workflow engine which is the same engine that Nintex Workflow uses. Microsoft claim they have resolved the issue in later CU updates.