The problem with safety advice is what level to pitch it at. You don’t want to terrify a child but you can also plan for so many eventualities that you may never experience.
I’m going to give my personal tips for most eventualities. Day to day most people will never have to think of some of them. Rather like how many people partake in fire drills but never see a real fire.
With knives and weapons. They’re usually only brandished once someone has an altercation. So a 12 year old girl, unless she is unusually bolshy should be fine. To anyone, I’d always advise not winding strangers up (or even seeking interaction with them). You never know who you’re dealing with.
A child also wouldn’t usually be seen as a high value target, unlike for example a laptop, wallet carrying businessman would be. So making sure her bag is closed and high value items are not obvious and placed out of reach is basic. If the bag is a rucksack use both straps.
For females stealable items could include jewellery etc but again, I’d expect a 12 year old wouldn’t be high on most robber’s list of targets and usually wouldn’t be wearing obviously expensive items day to day.
She is possibly more likely at risk from her own peers. Bullies or local school gangs. So perhaps ensuring her route doesn’t cut through a rival school turf or whatever.
It’s always a good idea to be accompanied by a friend if possible.
When I’m on the tube, even as an adult but especially with a child. When we get off the train we usually head to the wall of the station behind some hard cover, or a seat and let the main crowd dissipate. Just in case someone rushing barges the child towards the platform gap. You’d be relying on the driver seeing the child fall or someone else seeing it and doing enough to prevent the driver leaving. Likewise don’t approach the edge until the train is stopped.
In the highly unlikely case of a stampede or something hard cover could save you.
When walking, stick to well lit areas and always step out from doorways etc to ensure no one lurking can surprise you.
Route planning is a good idea. Pick a route that passes along areas that are staffed, or have shops etc along them. Generally the larger a shop the better. If she is followed, a high street store or supermarket with a security guard and numerous staff would be a good place to go and raise concerns rather than a tiny shop where the owner could be friendly with the person following them. That said, the tiny shop may be better than nothing.
And knowing all possible exits and routes is useful too. In the extremely unlikely event of a terror attack it has been known that people can be funnelled towards another attacker. So knowing a little used exit or hiding place could be a lifesaver.
There is also advice about having electronic items set to silent. So in the event you do have to hide they won’t vibrate or make a noise.
When waiting. If your train is from a far off platform then waiting nearer the gateline or whatever till just before departure is a good idea.
Or wait under CCTV.
Finally, just being aware of minor things relating to general safety. Like making sure her bag straps don’t get caught in the doors. A lot of small safety rules get ignored and because they only affect 1 in thousands most people don’t consider them. How many people were taught not to cross roads behind parked cars but do so regularly.
Instinct is useful too. If she feels something is off, remove herself from the situation immediately, if possible without making things too obvious and provoking a reaction (just pretending she’s on the wrong platform or something for example)
And if she feels someone is creepy maybe she can find a coach where she can be around women rather than men.
And again, always knowing where she can get help at any stage of the journey is important.
I once read an article by the wife of a famous pilot. He flew her cross country in a small plane. She mentioned that afterwards he told her that every second of that flight he had in mind somewhere he could see that would be his landing site if the engine suddenly failed.
When I go to a hotel I immediately check the fire exits as so many hotel fires have happened over the years. Likewise on trains, knowing where fire extinguishers and passenger alarms are takes seconds but could be useful.
It could also be a good idea to have numbers stored in her phone such as the 61016 text number and things such as her school office etc.
Tbh, safety advice can go so far as to delve into psychology. For example people often like to leave by the entrance they came in at. Which is fine until a fire or something unpalatable stands between you and that. This is when knowing your surroundings counts.
I hope there is something useful in what I’ve wrote. But it’s probably not necessary to scare her with all of it!
All in all though most risks to her are likely to be small and she’ll likely have no issue travelling.