What am I doing wrong
Its not what you're doing wrong, it was an oversight on my part! (place embarrassment emoji here).
Here's the code again:-
Private Sub Worksheet_Change(ByVal Target As Range)
Dim x As Long: x = Target.Row
Dim lr As Long
If Intersect(Target, Columns("K:K")) Is Nothing Then Exit Sub
If Target.Count > 1 Then Exit Sub
If Target.Value = vbNullString Then Exit Sub
Application.EnableEvents = False
Application.ScreenUpdating = False
lr = Sheets(Target.Value).Range("B" & Rows.Count).End(xlUp).Row + 1
If lr < 9 Then lr = 9
Union(Range("B" & x), Range("C" & x), Range("D" & x), Range("E" & x), Range("I" & x)).Copy
Sheets(Target.Value).Range("B" & lr).PasteSpecial xlValues
Application.CutCopyMode = False
Application.EnableEvents = True
Application.ScreenUpdating = True
You'll note that I have moved the last row (lr) declaration to its correct position in the code (line 13). I've also added a couple of extra lines(7 and 8) which will help guard against accidental inputs and empty strings in the target column creating new errors.
Read through the code then implement it in place of the previous one but, again, test it in a copy of your workbook first.
I hope that this helps.