Templates are instantiated during compilation. The compiler cannot possibly foresee which W and K shall the users give on each run of the program, but one has to generate code for different function for each unique pair of (W,K).
That is similar to automatic arrays; they are defined already during compilation. Variable-length arrays (VLA) have more code to delay the size determiation to the runtime. Support for VLA has been added to C, but not to C++. Some compilers allow VLA in C++ as non-standard extension.
C++ has std::vector that is more than VLA. Your latter program written with vector:
1 2 3 4 5 6 7 8 9 10 11
#include <iostream>
#include <vector>
int main()
{
unsignedint W {}, K {};
std::cin >> W;
std::cin >> K;
std::vector<std::vector<int>> custom( W, std::vector<int>( K, 220 ) );
return 0;
}