Not necessarily. Just run the numbers.
I installed rooftop solar during low interest rates. I could have paid cash but my loan payment is less than the power bill it replaced.