.
You can place the digit "1" into any of 4 cells.
Then you have 2 and only 2 possible adjacent cells to place the digit "2" there.
After that, you have one and only one free adjacent cell to place the digit "3" there.
Finally, you have only 1 remaining cell to put the digit there "4" without any other choice.
Fortunately, this last cell is adjacent to "3", so all requirements are satisfied.
So, the full number of ways is 4*2 = 8 different placements.