Whether you need a party wall agreement depends on your work and England/Wales law; Scotland and NI have no such Act.
The Party Wall Act 1996 creates a legal duty to serve written notice before specified work, in England and Wales only.
The Act sets fixed distance and depth triggers; if your work meets them, serving notice is a legal requirement, not optional.
These are three distinct legal regimes; satisfying one does not satisfy the others.
The Act sets minimum notice periods of 1 or 2 months depending on the type of work.
Scotland and Northern Ireland have their own distinct legal systems for shared walls and building work, separate from England and Wales.