Your domain, DNS, business accounts, content and customer data should normally remain under your control. A supplier may need access to do agreed work, but that access should be delegated, documented and removable.
This matters because the domain and primary accounts are the keys to your public identity. If they sit only in a supplier’s account, changing provider can become needlessly risky.
For customer-specific code, the contract should say what you own or license, what reusable tools existed beforehand, and which third-party licences still apply. At handover, expect a practical inventory of source, accounts, provider relationships, renewal dates and the access that should be changed or removed.
Nobody gets trapped at Yellow Brick Tech. That is an operating principle; legal ownership still needs clear project terms rather than an assumption.