We can calculate the voltage across an inductor as $$V=-\frac{d \Phi}{dt}$$ I am not sure why can we write this since an inductor isn't a closed-loop, which is a condition for Faraday's law.
This is actually generally valid expression for induced EMF for any closed path in space. Some (even very knowledgeable) people use unfortunate (misleading and IMHO incorrect) term "induced voltage" for this. But induced EMF for a circuit element is distinct concept from voltage on that element as used in (for example) solving RLC circuits, so using the name "voltage" and letter $V$ is heavily misleading here.
Instead, always write this as expression for induced emf in a loop; for a closed oriented curve in space $\gamma$ (oriented means it has associated positive direction of circulation):
$$
\mathscr{E}_{i, \gamma} = - \frac{d\Phi_S}{dt}
$$
where $\Phi_S$ is magnetic flux through (integral of normal component of magnetic field over) any continuous surface $S$ limited by the path $\gamma$:
$$
\Phi_S = \int_S d\mathbf S\cdot \mathbf B.
$$
Now its application to inductors directly indeed doesn't make sense, as you have noticed, because there is no obvious closed curve $\gamma$ to use. There are additional associated ideas needed to apply Faraday's law to electromagnetic induction in inductors:
- in the simplest case of ideal inductor far from other inductors or magnetic bodies, we are interested in self-induced EMF for the (non-closed) path in space that electric current goes through in the inductor when going from its terminal 1 to the other terminal 2; this is EMF still defined by integral of induced electric field, but the integration does not go over a closed path, but over a path segment that coincides with the path the current takes, i.e. it goes inside the wire that makes the inductor's coils. Mathematically, this EMF is
$$
\mathscr{E}_{12} = \int_{\text{path from terminal 1 to terminal 2}} \mathbf E_{i} \cdot d\mathbf s
$$
where $\mathbf E_i$ is induced electric field.
- since the path of integration isn't a closed path we cannot relate this to Faraday's law. But we won't make big error in the integral if we extend the integration path by additional imagined path element going from 2 to 1 that completes the integration path into a closed curve.
This additional path element is only subjected to condition that it contributes negligibly to integral of induced field. This is the case if the element is as short as possible and straight. It must not follow the coils.
Thus we obtain approximate but accurate expression for $\mathscr{E}_{12}$:
$$
\mathscr{E}_{12} \approx \int_{\text{coiled path from terminal 1 to terminal 2}} \mathbf E_{i} \cdot d\mathbf s + \int_{\text{straight short path from terminal 2 to terminal 1}} \mathbf E_{i} \cdot d\mathbf s.
$$
Since the path is closed now, we can use the Faraday law:
$$
\mathscr{E}_{12} \approx - \frac{d\Phi}{dt}
$$
where $\Phi$ is magnetic flux through the closed path just defined. It turns out that if contribution of the added path element EMF is negligible, total magnetic flux is independent of shape and position of that path element and depends only on current passing through the inductor:
$$
\Phi = LI
$$
where $L$ depends on geometry of the inductor coils. The more coils, the bigger $L$, the closer the coils the bigger $L$, etc.
So there is ambiguity in how to complete inductor to a closed path but in most cases when that added completing element is short and noncoiled, it does not matter - because effect of induced field over that element is negligible.
How does $\mathscr{E}_{12}$ relate to voltage on the inductor? In case of ideal inductor with no ohmic resistance, the relation is simple: since total field has to be zero in the coiled wires, Coulomb field exactly cancels the induced field in wires, so potential drop going from terminal 1 to terminal 2 equals minus EMF:
$$
V_1 - V_2 = - \mathscr{E}_{12} = + L\frac{dI}{dt}.
$$
In case of a real inductor with ohmic resistance $R$, the potential drop is affected by it:
$$
V_1 - V_2 = RI - \mathscr{E}_{12} = RI + L\frac{dI}{dt}.
$$