Congratulations on your offer! they are quite difficult to get. Do you have deadline by which you have to accept this offer? and how soon do you think you will be hearing from the others?
First, you can ask the first offer for an extension for formally accepting because you're waiting on other offers?
Failing that, accept the offer (a bird in hand....) if you get something better, you simply write an email to them thanking them for the opportunity but you've got something that is more well aligned and as such will no longer be taking up their offer.
I'm not sure about the legal aspect so hopefully, someone who is more knowledgeable about that angle will come on. I believe legally they would have a case if you signed and then broke the contract.....however, i also think this sort of thing rarely goes to court and employers just find someone else.
It feels bad, but remember employers reject people all the time and will have no qualms about rejecting other candidates. With the job market the way it currently is, I am sure they will have no problem filling their vacancy from their reserve list which all sensible recruiters have.