Instead of doing a nested loop, sort the first sheet to group the data and loop over the rows, incrementing the columns to paste to as you go. If you need to retain the original order add a column and set the values equal to the row numbers and include that as your secondary sort key.
Sub Sample()
Dim ws1 As Worksheet, ws2 As Worksheet
Dim RngToUnstack As Range
Dim RowSource As Long
Dim RowDest As Long
Dim ID As String
Dim Count As Long
Set ws1 = ThisWorkbook.Sheets("Sheet2")
Set ws2 = ThisWorkbook.Sheets("Sheet3")
Set RngToUnstack = ws1.UsedRange
RngToUnstack.Sort Key1:=RngToUnstack.Columns(1)
RowDest = 0
For RowSource = 1 To RngToUnstack.Rows.Count
If ID <> RngToUnstack.Cells(RowSource, 1) Then
ID = RngToUnstack.Cells(RowSource, 1)
RowDest = RowDest + 1
Count = -1
ws2.Cells(RowDest, 1) = ID
End If
Count = Count + 1
ws2.Cells(RowDest, Count * 3 + 2) = RngToUnstack.Cells(RowSource, 2)
ws2.Cells(RowDest, Count * 3 + 3) = RngToUnstack.Cells(RowSource, 3)
ws2.Cells(RowDest, Count * 3 + 4) = RngToUnstack.Cells(RowSource, 4)
Next RowSource
End Sub