Binary search trees commonly knows as BST are a special type of trees which are sorted in nature. In binary search tree every node is larger than its left child and smaller than its right child. This feature makes it easy to search, insert and delete a node from binary search tree.
Algo
//Check if root node is empty or not
// If yes then assign new node to root
// If not than iterate. Iterate method will check the node value to add from left and right child of the currently processing node.
// if node value to add is lesser than the node than move tho left child
// If left child is empty than assign new node to this left child node
// else call iterate method
// IF node value to add is greater than the node value than move to the right child
// If right child is empty than assign the new node to this right child node
// else call iterate method
If this helps you can look for full article here Binary Search Tree Insert node Implementation in Javascript