It is sad to say, but school security in this day of age is a requirement. The first thing to do will be reduce the chance of an unauthorized person entering the school. Every student will use their National ID Card. This will mean the guardian will have to pay for the card before entering school, and up until the age of 16, they will have to renew every 2 years considering that the physical looks of the student will change. The ID card will only allow the student to enter the school they are in, and no other school. Any student needing to go to another school will have to report to the office to get a visitor pass.
The school will have metal detectors. This is to reduce the chance of bringing in weapons which will not be allowed on school property. There will also be school security, and the school can go into lockdown where the classrooms will automatically lock to keep the students safe if a bad actor did manage to enter the school. The goal will be to try to hide this as much as possible. School should feel like a school, and not a prison.