This is a nice example: the standard reduction potentials are close, so the Nernst equation ultimately reveals what is favored to happen spontaneously, ignoring all real world complications.
Consider a galvanic cell having a tin $(\ce{Sn})$ metal electrode in $x~\pu{M}$ aqueous $\ce{Sn(NO3)2}$ and a lead $(\ce{Pb})$ metal electrode in $y~\pu{M}$ aqueous $\ce{Pb(NO3)2}.$ Assume the salt bridge is an aqueous solution (very roughly $\pu{1 M})$ of $\ce{KNO3}.$ Under standard conditions, $x = y = \pu{1 M},$ and the standard reduction potentials are
$$
\begin{align}
\ce{Pb^2+(aq) + 2 e- &<=> Pb(s)} &\quad E^\circ &= \pu{-0.126 V} \\
\ce{Sn^2+(aq) + 2 e- &<=> Sn(s)} &\quad E^\circ &= \pu{-0.14 V}
\end{align}
$$
So $\ce{Pb^2+}$ is spontaneously reduced to $\ce{Pb(s)}$ and $\ce{Sn(s)}$ is spontaneously oxidised to $\ce{Sn^2+}$. Hence, $\ce{Sn(s)}$ is the anode (where oxidation occurs) and $\ce{Pb(s)}$ is the cathode (where reduction occurs).
The galvanic cell, in standard notation, is
$$\ce{Sn(s)|Sn^2+(aq;\pu{1 M})||Pb^2+(aq;\pu{1 M})|Pb(s)}$$
and the standard cell potential is
$$E_\mathrm{cell}^\circ = E_\mathrm{cathode}^\circ – E_\mathrm{anode}^\circ = \pu{-0.126 V} – (\pu{-0.14 V}) = \pu{+0.014 V}$$
Note that the anode is at the left and it is $\ce{Sn(s)},$ so tin metal gets oxidized.
If $x = \pu{0.6 M}$ and $y = \pu{0.1 M},$ then the Nernst equation is used in the obvious way and the non-standard reduction potentials are computed to be $E_\ce{Pb} = \pu{-0.156 V}$ and $E_\ce{Sn} = \pu{-0.147 V}$, so
$$E_\mathrm{cell} = E_\mathrm{cathode} – E_\mathrm{anode} = \pu{-0.147 V} – (\pu{-0.156 V}) = \pu{+0.009 V}$$
and the galvanic cell notation is
$$\ce{Pb(s)|Pb^2+(aq;\pu{0.1 M})||Sn^2+(aq;\pu{0.6 M})|Sn(s)}$$
Again, the anode is at the left, but now it is $\ce{Pb(s)}$ that gets oxidized.