NOTE: This question is different than Draw an ASCII Rectangle because the user has to input only 1 number to generate a box, unlike the other question, where the user has to input the x and y size of the box.
Your task is to create a box based upon user input. Let's say I inputted 2. The box generated would look like:
As in, two by two long. Or, if I entered 7:
------- | | | | | | | | | | -------
So, seven by seven.
Notice the box generated above has 5 bars up and seven hyphens across. The hyphen directly above or below the bars does count as one vertical iteration.
One more example. I enter 5. The box generated:
----- | | | | | | -----
You can use any programming language you wish. The task is to be able to generate a box using the least possible amount of bytes.
 dzaima in SOGL, 17 bytes
 Adam in APL, 27 bytes
 HyperNeutrino in Python, 51 bytes