Another option using filtering, which is faster than looping.
User is prompted via an input box to enter the name, which is passed to the filter as the critiera.

Note: this code uses the sheet code name -- not the worksheet name. You can replace "Sheet1" with "ActiveSheet" to make the code a bit more generic.

Option Explicit

Sub Delete_Names()

    Dim sCriteria As String, rng As Range, lastrow As Long
    
    lastrow = Cells(Rows.Count, "A").End(xlUp).Row
    
    sCriteria = Application.InputBox("Enter a name: ", Type:=2)
    
    If Len(sCriteria) < 1 Then Exit Sub
    
    sCriteria = "*" & sCriteria & "*"
    
    Application.ScreenUpdating = False
    
    With Sheet1 'code name - - not worksheet name
    
        .AutoFilterMode = False
        Set rng = .Range("A1:A" & lastrow)
        rng.AutoFilter Field:=1, Criteria1:="=" & sCriteria
        rng.Offset(1, 0).SpecialCells(xlCellTypeVisible).EntireRow.Delete
        .AutoFilterMode = False
        
    End With
    Set rng = Nothing
    Application.ScreenUpdating = True

End Sub