Vyxal J
, 32 bytes
¤-\/pǏD£‛/-‛|.Ŀ⁰Ḋ¥:g\.VDg\/$V⁰²Ḋ
Try it Online!
How?
¤-\/pǏD£‛/-‛|.Ŀ⁰Ḋ¥:g\.VDg\/$V⁰²Ḋ
¤ # Push an empty string
- # Push "-" * a + b (where a is the (implicit) input, and b is the empty string)
\/p # Prepend "/"
Ǐ # Append its first character (the slash)
D # Triplicate
£ # Pop and store in the register
‛/- # Push string "/-"
‛|. # Push string "|." (for input 3, stack e.g. ["/---/", "/---/", "/-", "|."])
Ŀ # Transliterate (stack e.g. ["/---/", "|...|"])
⁰Ḋ # Duplicate the top value of the stack the input amount of times (stack e.g. ["/---/", "|...|", "|...|", "|...|"])
¥ # Push contents of register (stack e.g. ["/---/", "|...|", "|...|", "|...|", "/---/"])
: # Duplicate (stack e.g. ["/---/", "|...|", "|...|", "|...|", "/---/", "/---/"])
g # Take the minimum by character code, which is "-" (stack e.g. ["/---/", "|...|", "|...|", "|...|", "/---/", "-"])
\.V # Replace with a period (stack e.g. ["/---/", "|...|", "|...|", "|...|", "/.../"])
D # Triplicate (stack e.g. ["/---/", "|...|", "|...|", "|...|", "/.../", "/.../", "/.../"])
g # Take the minimum by character code, which is "." (stack e.g. ["/---/", "|...|", "|...|", "|...|", "/.../", "/.../", "."])
\/ # Push "/"
$ # Swap with the period (stack e.g. ["/---/", "|...|", "|...|", "|...|", "/.../", "/.../", "/", "."])
V # Replace (stack e.g. ["/---/", "|...|", "|...|", "|...|", "/.../", "....."])
⁰² # Push the input squared
Ḋ # Duplicate the top value of the stack that many times
# J flag joins the stack by newlines
n=3
? \$\endgroup\$