For recreational, the FAA registration number is tied to you, the person, and you can have multiple aircraft that you own using the same registration number. You should have been able to keep the registration number and have the other person register it with their own number. Otoh, canceling, creating a new registration number for recreational is not a bad move in case other person does not register what you sold them. For $5 for 3 years for as many aircraft as you have (recreational) not a bad precaution. Also keep a hard copy of your registration in your aircraft bag, case, box.
Keep in mind things are different for 107, there it is a unique registration per aircraft, and, as of 4/21 hard copy proof of registration is also required to be with you when flying. Plus, if a LEO/NTSB/TSA/FAA person asks to see your aircraft registration, plus 107 cert and picture ID, they hopefully all line up.