If I understand correctly, you've been using the same email thread to reply to emails, which is resulting in the emails being logged on all contact and company records in the CRM that have been associated with the email thread at any given time during the conversation. You, however, wish to only log emails on the most relevant records in the CRM (like the contact you're currently replying to).
If what I described above is the case, this is expected behavior - HubSpot identifies email conversations by an email ID, which doesn't change if you use the "Reply to" option. Even though you're replying to a specific contact, HubSpot will still think this is the same conversation and will log the email on all associated records.
If you wish the email to log on specific records, it would be best to start a new email thread.
If this is not what you're experiencing, can you please share additional information and screenshots of records where the emails aren't logging correctly.
The more details and screenshots you can share, the better the Community can help.