We know that since $\vec{\nabla}\cdot\vec{B}=\vec{0}$, so $\vec{B}$ can be expresses as the curl of some special kind of vector function, i.e., $\vec{B}=\vec{\nabla}\times\vec{A}$.
Also, since always $\vec{\nabla}\times\vec{E}=0,$ thus $\vec{E}$ can be expressed as the gradient of some special scaler function. i.e, $\vec{E}=-\vec{\nabla}V.$
Now we have Faraday's equation, given as: $\vec{\nabla}\times\vec{E}=-\frac{\partial\vec{B}}{\partial t},$ which is applicable only when there is a changing magnetic field. So, $\vec{\nabla}\times\vec{E}=0$ applies when all fields are static, and the later applies in the non-static field scenario.
My question is, how can we arrive at the following equation: \begin{equation} \vec{E}=-\vec{\nabla}V(\vec{r},t)-\frac{\partial}{\partial t}\vec{A}(\vec{r},t) \end{equation}
I can reason that this equation is true, since applying curl on both sides makes 1st term on the right zero, and second term gives partial derivative of magnetic field vector. So the result is nothing but Faraday's equation.
But I feel thats not the whole story.
Further, how to arrive at the said equation at first place? What concepts am I missing?