I've read in a book that performing Istekhara for something is the last resort. That is, after you consult with people, and still don't know what to do, then do Istekhara. So I wanted to ask if this is true, or can we perform Istekhara anytime, even if we don't consult with people around us?

What you have read is correct.