Thanks to @Stephen Kitt. Found the answer at What are the shell's control and redirection operators?:
command &> out.txt
> Both standard error and standard output of command will be saved in out.txt, overwriting its contents or creating it if it doesn't exist.