The scenario described, where an attacker repeatedly attempts to log in using the same username with different passwords until the account is locked out, is typically considered a brute force attack. Brute force attacks involve systematically trying all possible combinations of passwords until the correct one is found or until the account is locked out due to too many failed attempts.
On the other hand, password spraying involves using a few commonly used passwords or a small set of passwords across multiple usernames. The attacker tries these passwords against many different user accounts, hoping to find one that is vulnerable. Unlike brute force attacks, password spraying focuses on spreading the attack surface thin across multiple accounts, often to avoid triggering account lockouts or detection mechanisms.