Her decision to step down comes a day after a congressional hearing in which she was sharply criticized by members of both parties for security failures linked to the assassination attempt on former President Trump.