to do something in advance
Expresses doing an action in advance, preparing for a future need or purpose.
This pattern is used when you do something now because it will be useful later. It often implies preparation, like getting things ready before an event or making a decision ahead of time. For example, you might clean your room before a guest comes, or check a schedule before making plans. The action is done with the future in mind.
Formally, you use the て-form of the main verb plus おく. In conversation, you will often hear the contracted form とく (e.g., 買っとく). That is fine in casual speech, but in writing or formal situations, use the full ておく form.
Note that ておく is different from てある. てある describes a state that exists as a result of someone's action (e.g., 窓が開けてある – the window is open, someone opened it). ておく focuses on the action of preparing, not the resulting state.