How to give the same error message when the wrong password or wrong username is used?

You can use login_errors filter for changing the custom error message

Please have a look at

Change login error messages