In digital logic design, this is called a synthesis tool. In the design of real digital circuitry, you write a code-like hardware description using a language called an “HDL” (hardware description language) such as VHDL or SystemVerilog. Then a program called a synthesiser converts the HDL into a digital circuit.
Each module is designed this way then hooked up using busses and wires.
In real-life, you would then send the generated design to the manufacturing team