If the Will leaves everything to spouse then:
If the surviving spouse / civil partner is uk domiciled then on 1st death surviving spouse receives everything without paying IHT due to spousal exemption.
If the couple are not married or in a civil partnership then only the first £325k is exempt. This is a massive problem that many unmarried couples don’t know/understand!
If either spouse is non-uk domiciled at the time of death it’s more complicated.
The £175K residential nil rate band (RNRB) is available when the main residence is left to a direct descendant (there’s a definition which includes step children etc.).
If everything passes from Spouse A to spouse B on first death, and then from Spouse B to direct descendants on second death (and assuming the main residence is worth at least £350k) then the executors cain claim 2 x £325K NRB’s and 2 x £175k RNRB’s - which is where the £1m exemption comes from.
It’s potentially a lot more complicated than that depending on gifts made within 7 years of death. Technically gifts to discretionary trusts can have an impact on the final tax bill within 14 years of death