The error message you are showing is telling you that you are missing the fansi package, which is a dependency for tidyverse, so, you have to install it first.
install.packages("fansi")
That option is only applicable for Windows systems, not for macOS or other Unix based operating systems. I'm not a macOS user so I don't know how to do it using the graphical interface but the equivalent would be to execute the program with sudo rights.