Indeed, if you plan to move to a new location, you can post some more extensive screenshots here of what you did do if you want advice on what to do better next time.
My main advice is to not skimp on the braziers as they are, in many ways, more important than walls. That is, a good lineup of braziers will keep you almost safe with only one stone wall, but no amount of walls in the world will keep you safe without enough braziers. Torchposts should be a part of your defenses too as they use a different damage calculation from braziers and have different mechanics so you'll only get benefits from having both. And even a handful of baby braziers can let you spot defend if this sort of thing happens again.
The idea of the gatehouse that you have there is not a bad one, but again, the main reason for something like that is so you can concentrate fire, so you'd want to have extra braziers on all sides of it.
Put the simpler wooden fences around your large areas that have low value stuff like if you have extensive fields of low quality and/or you fenced in your wood piles. Put your stone and plank around your main living areas where you have houses and craft buildings and raw materials. Put your brick around the valuables, including any mine entrance you might have, and if you make a steel wall, you'll want that to be very small and only protect your very most valuable things such as a mine or town bell if you have one. And always go weak walls on the outside and stronger ones on the inside as strong walls will cause splash damage to equal or weaker walls when they are destroyed.
If you're playing with friends, you probably have the resources to invest in a town bell, which will make it harder for people to raid you at an extra cost of silver.