I have a SharePoint online site and a local SharePoint server with user accounts that i want to import to the the online SharePoint site. I know about Azure Active Directory Connect tool that used for connecting SharePoint online, but is there any other way to connect SharePoint with local server like web hooks and Rest API calls to local Active Directory to synchronize user accounts between SharePoint online and Active Directory ?
The User Profile must be linked to an existing object in Azure AD as the process for creating a Profile requires you to identify an existing object to bind to. For updating properties that are outside of Azure AD -> SPO sync, use the User Profile Batch Update API to do this in bulk. This is CSOM only, and must run on the local network containing the Domain Controller(s) as Active Directory (or LDAP in general) should not be exposed to an endpoint over the Internet due to creating significant security risks.
Another thing to keep in mind is that Azure AD is where objects are stored/is the identity store; a User Profile in SharePoint [Online] is not an identity store, it is simply a description of the object (user) that can be leveraged in other areas of SharePoint.