Your law firm owns the parts of its website that a signed agreement assigns to it, plus any account registered in the firm’s own name. Paying an agency’s invoices does not transfer the rest.
Most firms learn this at the worst moment, right after deciding to leave. The new agency asks for the domain, the hosting login, and Google access, and nobody at the firm has any of it....