start with the volume of a regular hexagon pyramid

$V=\dfrac{\sqrt 3} 2 s^2 h$

where $s$ is the length of a side, and $h$ is the altitude.

To construct this pyramid you need 6 pieces of bar length $s$, and 6 pieces of bar length $\sqrt{s^2 + h^2}$

You don't want to waste any bar material. By symmetry of the problem you are best off splitting each bar into two pieces, one will be a side, and one will be the slanted vertical piece.

So you have a constraint equation

$s+\sqrt{s^2+h^2}=7$

Now you can either solve for say h in terms of s and substitute that back into the Volume formula and then minimize that in the usual way by equating the first derivative to zero etc. Or, you can use the method of Lagrange multipliers.

Can you take it from here?