Two different paths to chase and decide?
One is replacement and for that we need to know what brand and model of water heater you have to make better suggestions. One idea is if you do want to replace iit, knowing which you have is one step to getting a new one that has the same features and small points like where the gas and water lines connect. Easier to replace one if the new has the same places to connect gas and water lines. Looking on the outside of the water heater may let you find a tag with that info?
But the idea of fixing can often be cheaper and work very well at times. One of the questions on welding is finding where and how it cracked as that changes the problems of welding. For that, I would take the question by a welding shop and let them take a look at the problem. Welding can sometimes be very easy, sometimes it takes a really good welder!
A tricky question on several points as the water heater brands have changed over time as different companies have been sold or bought out. What you find in your area may be different than in other areas.
We have had several folks here that reported good results on getting them welded, but I have no personal experience with it.
Wish you luck on the search?