Both of the previous answers are good, but I want to dive into the weeds on this question a little more. So we know that correlation is not causation, but correlation is also not not causation. So when do we get to say that correlation is causation. Unfortunately, the data itself can never tell us this, we can only arrive at this by imposing assumptions on the data.
I am going to use directed acyclic graphs (DAGs) since they graphically encode the assumptions. Let's focus on three variables: $A$, $B$, and $U$ (you can extend this to more, but the basic concepts remain the same). $U$ is some variable we did not have the opportunity to collect. Each arrow in the DAG indicates a causal relationship, with the direction of the arrow indicating what causes what. For three variables (and the ordering restriction), following are some possible DAGs that will result in a correlation between $A$ and $B$:
Correlation is causation in only DAGs numbered 1, 2, and 3; which requires appealing to outside knowledge (although 3 is tricky since $U$ being a common cause of both $A$ and $B$ can flip the relationship from the true causal direction, e.g. $A$ is protective from $B$ in reality but $U$ makes it look harmful).
One way to determine whether correlation is consistent with causation is if we conducted a randomized experiment. If we did not randomize based on $U$ and $B$ was measured after $A$ was randomized, then we know that an arrow from $U$ to $A$ and $B$ to $A$ are implausible. Therefore, we can say that the correlation is causation. Alternatively, maybe we have some subject matter knowledge on the topic of $A$ and $B$ that says there are no common causes (unlikely in reality but this is only an example), similarly we can say that correlation is causation.
The important part is that the assumptions used to claim correlation is causation are supported by outside knowledge. How and exactly what outside knowledge is needed is an important issue.
There are a variety of frameworks and formal assumptions that can be used to make the claim that a certain correlation is causation. The key part is that the data alone cannot tell you whether a correlation is or isn't causation. Some outside assumptions or procedures must be applied in order to distinguish non-causal correlations from causal correlations.
As to my example of a scenario with causation but no correlation, DAGs are assumed to be faithful. This basically means that there are no perfect cancellations that occur (all the individual causal effects don't cancel out perfectly to result in no average causal effect). Because of this, it is a little trickier to claim that no correlation means no causation.