How do we know that when do we have to use dot product and cross product in a problem?
Dot product serves the purpose of finding what component of a vector is the direction of some other vector. Or if we know the vectors them it can serve the purpose of finding the angle between them.
While Cross product is used when we want to find a new vector perpendicular to two known vectors as in the case of find the normal to a plane.Or when we want to find the area of a triangle or a parallelogram given that we know two adjacent sides in vector form.
We can also use a combination of them as we do to find the volume of a parallelopipe.