You can create assocaition while creating the contact object or company object. In v9 of node hubspot/api-client. You need to pass associations parameter while creating an object.
An example of creating a note and associate with contact.
```
const note = await hsClient.crm.objects.notes.basicApi.create({
properties: {
hs_timestamp: moment.utc().toISOString(),
hs_note_body: ‘test note’
},
associations: [
{
to: {
id: <contactId>
},
types: [
{
associationCategory: ‘HUBSPOT_DEFINED’,
associationTypeId: <notes_to_deal_associationId>
}
]
}
]
});
```