How do I properly copy credit and flow after OS update on a RPI

Copy the whole of the .node-red folder across except the node_modules folder. Then cd into the .node-red folder and run
npm install
which will install all the extra nodes you need (the details of what to install are in package.json and package-lock.json). Then restart node-red.