You can produce defensive weapons in the Defense Factory building the higher you upgrade the factory the better and higher level you can produce

Note:
When building defensive weapons, they will be automatically placed around your base to defend against enemies. To protect the base better, keep upgrading the defense factory to produce advanced defensive armaments.