You would need to know about the computations that are being done.
For example, you would set the seed before initial_split() since it uses random numbers.
You might also use it before calling one of the tune_*() functions (or similar) if
- the model uses random numbers (like random forests)
- you are using the
grid function to have tidymodels make a tuning parameter grid for you
and so on. It really depends.
If you are never going to change your script, you can se the seed at the top. This is a pretty bad assumption, so we often set it multiple times in a script.