Select your donation. Click on the ‘Donated by’field and select the donor contact.

If the donor does not have a contact yet, you can create a new contact by clicking the ‘+’ plus sign button on top.