how to connect the circuit by using raycast click

You really should ** try ** first before asking.
Most of us will be using now VS, unless anyone is still on older version for any reason, where VS is optional.