You need to update before installing software
Use yay -Syu libreoffice-fresh
yay -Syu libreoffice-fresh