[sentence A]。そのため(に)、[sentence B]。
Note: Functions as a conjunctive expression connecting two sentences. に is optional.
そのため (or そのために) is a conjunctive expression used to connect two sentences. It refers back to something previously stated and has two main usages: expressing cause/reason and expressing purpose.
When used to explain a consequence or result, そのため indicates that the preceding statement is the reason for what follows. In this usage, it functions similarly to だから or したがって, but sounds more formal and is common in written Japanese, news, and formal speech.
In this causal usage, the sentence after そのため describes something that has already happened or a factual outcome.
When used to express purpose, そのため(に) indicates that the action in the following clause is done in order to achieve the goal mentioned previously. In this usage, the form そのために (with に) is more common.
In the purpose usage, the sentence after そのために typically describes an ongoing effort or plan.
The key difference is whether what follows is a result (cause) or an effort/action (purpose). Context usually makes the meaning clear: