That Is where either calculation or experimentation comes in. Notice it looks like it has an adjustable length? That is so it can be tailored to a certain sound frequency, aka drone.
Length can be calculated from info on line if you Google helmholtz resonator, or you can use one that is adjustable.
And yes, the end has to be welded shut, to reflect the sound wave back into the exhaust pipe.