The choice of antibiotic depends on several factors, including the suspected or confirmed causative agent, the site of infection, patient history, and local resistance patterns. Broad-spectrum antibiotics are often used when the causative agent is unknown, especially in severe infections. Once the pathogen is identified, providers may switch to a narrow-spectrum antibiotic to target the specific bacteria.