If you would like to use the username and password, and the authentication attempt is programmatic meaning no user intervention needed or you would not like to use external browser then you can try using Programmatic Access Token.
PAT is a new feature which enabled you to use the use an PAT token instead of a Password, this will not require MFA to be set up for the user, However the caveat to this is that the user should be behind the network policy applied at the account level or at the user level.