Fundamentally, logic is a formal tool for preserving truth. Logic alone cannot tell us what is true and what is false, since we always need to begin a logical deduction with a set of propositions called our premises which are simply assumed to be true. Of course, we could try to construct a logical proof for these premises, but such an argument must in turn be based on another set of premises. Since no one can construct an infinitely long logical deduction, at the end of the day, the conclusions of a logical argument will always be determined by an initial set of premises which themselves do not have any logical proof. Thus, all logic can do is allow us to determine what we are able to infer from existing truths, such that if we begin with all true statements we will end up only with true statements.
Truth-preserving, logical validity, soundness, and inductive strength: a short overview of the relationship between logic and truth
Logical truth: some useful notes on the subject of logic and truth from the Stanford Encyclopedia of Philosophy
Truth, validity, and soundness: a brief introduction to the relationship between logic and truth, with examples