Using expression for field due to a straight wire, let's add up magnetic fields due to all 4 sides of the square loop. The expression for straight wire is derived (using Biot Savart's law) in previous video here • Biot Savart law (Easy Calculus) Fiel...
You can take up a challenge and derive the same result for a current carrying regular hexagon loop. Try it, and let me know what you find as the answer.