It depends somewhat on local code.
I'm in earthquake country, so they like to see flex's here.
Some parts of the country, like solid piping.
Flexes come in copper, stainless, and braided.
What is the preferred method plumbers use for water supply connections to the water heater, hard plumbed with copper pipe or copper flex lines? This is in Southern California if it makes any difference. Local codes allow both methods. Just wondering which way is best and more professional looking.
If you are going to do the installation yourself, you will find the flex pipes much easier to fit. Solid piping requires more precise pipe fitting. Of course, you have to heed local codes.
I have not installed a residential water heater using anything but flexible copper connections in decades.