Then you cut the anode rod with a sawsall. And if the ceiling isn't high enough, you cut the hot and cold pipes and let some water out and just tip the water heater so you can get the rod in. I used to use the Rheem SP11526C, it was cheap, 44 inches long and .9 inches diameter, the cheapest/longish/thickest out there in terms of bang for the buck, I think I paid $13.45 for them the last time I got them, now the same place is up to $28.99 for the same rod. Inflation/supply chain issues, but Home Depot has it for $22.44. The segmented ones are shorter, have less material and cost a lot more and won't last as long. I just use shark bite fittings on the hot and cold inlets and of course you can reuse them when you change the rod again years later. I have 10+ water heaters so it's cheaper to just buy 9 anode rods to get enough to get free shipping and cut/tip the water heaters.
Rheem PROTECH anode rods are an important line of defense in preventing corrosion and leaks in your water heater. These devices work because the metal in the rod is sacrificed so the tank does not corrode.
www.homedepot.com