@amgschnappi this is common if you have not entered a valid email address in your user profile.
add a valid email address in the nextcloud account user profile (admin user?) and retry sending that test mail…
see Problem AxiosError: Request failed with status code 400 - #5 by nemo87