Localization of PID, if DVR, is a localization at a prime ideal

Let $R$ be a PID. Let $S$ be a multiplicative closed subset of $R$ and let $\bar S$ be its saturation. Then $S^{-1}R=\bar S^{-1} R= A$ (let) . Suppose $A$ is a Valuation ring, then it is also a DVR since it is PID. My question is : If $A=S^{-1}R$ is a DVR then how to show that $A=R_P$ for some prime ideal $P$ of $R$ ?

We don't really need that $R$ is a PID here, so let $R$ be any integral domain such that $S^{-1}R$ is a DVR for some multiplicatively closed subset $S$.
The prime ideals in a localization $S^{-1}R$ correspond to the prime ideals in $R$ that have empty intersection with $S$. In this case, as we know that $S^{-1}R$ has only two prime ideals, we know that $S$ has the property that there are exactly two prime ideals that have empty intersection with $S$.
As $(0)$ is a prime ideal that is contained in every other prime ideal, one of these two prime ideals must be $(0)$, let the other prime ideal be $P$. Note that since if $Q \subset P$ is any other prime ideal, then $Q$ will also have empty intersection with $S$, thus $Q=(0)$ or $Q=P$, so the height of $P$ must be $1$.
I claim that the saturation $\bar{S}$ is $R \setminus P$. Indeed, we must have $\bar{S} \subset R \setminus P$, because if $xy \in S$, then $xy \notin P$, so $x,y \notin P$ because $P$ is prime.
We know that $\bar{S}$ must be the complement of a union of prime ideals $\bar{S}= R \setminus (\cup_{i \in I} P_i)$, but any of the $P_i$ will have empty intersection with $\bar{S}$ (or equivalently with $S$), so they must be equal to $(0)$ or $P$, but then $\cup_{i \in I} P_i = P$, so $\bar{S} = R \setminus P$.
Thus $S^{-1}R= R_P$.
To summarize, what has been shown is that if for an integral domain $R$, some localization $S^{-1}R$ is a DVR, then $S^{-1}R=R_P$ for some height one prime ideal $P$.