How many people who express an opinion (judgement) on this actually know any trans people?
I do! Just a few quite well. Some for many years, others younger and very dear to me. And these days you'd be bound at least to encounter some trans people if you have anything to do with young people e.g. for your work.
The legislation was brought about to lessen the terrible toll that trying to be accepted for who they are takes on trans people
Yes I am sure it that was the intention. With an innocence that would be charming if it wasn't so dangerous. And then it became policy and a commitment and so it became necessary to stick fingers in ears and say "La La La" when anyone else tried to point out that there were serious downsides.
especially young people who are one of the highest groups to take their own lives.
Young people, perhaps, not especially due to being trans though. That's misinformation.
it wasn’t discussed widely in the press or on social media as far as I am aware
Well no it wasn't, so naive views like yours were not corrected by widespread public discussion or by reliable information.
so I would also question the assertions that the Scottish public didn’t want the bill.
That's hard to say. The bill is pig in a poke, the public don't know all the effects it will have, no-one really knows for sure. The Scottish government has said contradictory things about what legal effects it will have, so we don't know.
I wish the Scottish Govt had listened to women's advocates, and also taken more seriously the evidence about physical and psychological dangers to children and young people instead of using the "just like Section 28" trope. But the Scottish govt didn't take it seriously. Calling on the UK govt to stop it feels like stopping a bully by calling on a bigger bully!