When somebody states that the refractive index of glass is $\frac 3 2$ then that is taken to mean the refractive index when light is going from a vacuum in glass and it is the ratio
$_{\rm vacuum}n_{\rm glass} = \dfrac{\text{speed of light in a vacuum}}{\text{speed of light in glass}}\approx \dfrac{3 \times 10^8}{2 \times 10^8}= \dfrac 3 2$
and this is often called the absolute refractive index and just written as $n_{\rm glass}$.
A vacuum is taken as the reference with a refractive index of one.
So the term refractive index of glass can be taken to mean refractive index of glass (medium $B$) relative to a vacuum (medium $A$).
This being the case then you can say that the optical density of medium $B$ is greater than medium $A$ noting that this is not the statement that you made in your question.
If the light is going in the opposite direction, ie from glass into a vacuum (optically more dense into optically less dense), then if you so choose you could define a relative refractive index for a vacuum relative to glass and its value will be
$_{\rm glass}n_{\rm vacuum} = \dfrac{\text{speed of light in glass}}{\text{speed of light in a vacuum}}\approx \dfrac{2 \times 10^8}{3 \times 10^8}= \dfrac 2 3$.
If you designate that the refractive index of going from medium $A$ to medium $B$ is $_{\rm A} n _{\rm B}$ and the absolute refractive index of medium $A$ is $_{\rm V}n_{\rm A}=n_{\rm A}$ and that of medium $B$ is $_{\rm V}n_{\rm B}= n_{\rm B}$ then it is relatively easy to show that
$_{\rm A}n_{\rm B} = \dfrac {n_{\rm B}}{n_{\rm A}}$
When dealing and interface between two mediums $A$ and $B$ where the angle in medium $A$ is $\theta_{\rm A}$ and the angle in medium $B$ is $\theta_{\rm B}$ it is perhaps easier to use absolute refractive indices (relative to a vacuum) as follows
$n_{\rm A} \sin \theta_{\rm A}=n_{\rm B} \sin \theta_{\rm B}$