From this and your previous question, I suspect your confusion stems from the interpretation of $L$ in the length contraction formula. In fact this is something that confused me a lot when I was starting out.
Consider two observers attached to frames $S$ and $S^\prime$, with $S^\prime$ moving at speed $v$ relative to $S$ in the $x$-direction. Let their coordinates coincide at the origin. When we derive the formula for time dilation, we consider a change in time of $\Delta t=t_2-t_1$ in the $S$ frame. Performing a <PERSON> transformation then gives a that same change in time in the $S^\prime$ frame as $\Delta t^\prime=t_2^\prime-t_1^\prime=\gamma(t_2-t_1)=\gamma\Delta t$ since $x=0$ for the observer in $S$. So we arrive at the familiar $$\Delta t^\prime=\gamma\Delta t,\tag*{(1)}$$ which tells us that the time for the observer in $S$ to reach $t_2$ is seen to be dilated to the observer in $S^\prime$.
Naively, we might try next to do the same thing for the spatial coordinate(s). Say we consider a length $\Delta x=x_2-x_1$ at $t_1=t_2=0$. Going through the same motions, we find that $$\Delta x^\prime=\gamma\Delta x.\tag*{(2)}$$ But wait. 562
This isn't the correct form of the length contraction formula. It should really be $\Delta x^\prime=\Delta x/\gamma$. What gives?
The way to understand this is to realize that $L$ is supposed to be a length. Equation 2 is the $x^\prime$ distance between two points (the ends of the rod, say) at different times. This is obviously no good. While for the derivation of the time dilation formula it was okay to compare the intial and final times despite the fact that each observer had changed spatial position from the perspective of the other, the same is not okay for measuring the length of a rod. You need to measure the spatial positions of either end at the same $t^\prime$ coordinate.
This is something that can be made much clearer by a spacetime diagram:
(<PERSON>, 2008)
Considering the diagram on the right, the $x^\prime$ distance between the pair of diagonal dashed lines is the $\Delta x^\prime$ in eq. 2. The contracted length however is the $\Delta x^\prime$ shown in the diagram, which is a distance between points at simultaneous $t^\prime$. 586