Roll-up summary relationship rules
Key Takeaway
A roll-up summary field needs a master-detail relationship. After the field exists on the master object, you can't convert that relationship to a lookup relationship.
A roll-up summary field shows a value on a master (parent) record that is calculated from its related detail (child) records. It lets you show totals from a related list without code, but it only works across a master-detail relationship. That rule shapes where you can create the field and what you can change later.
What a roll-up summary field calculates
A formula field calculates from fields on a single record. A roll-up summary field is different: it calculates from a set of related records, such as those in a related list.
For example, imagine you keep invoices in an Invoice custom object, and each invoice is related to an account. A custom Total Invoice Amount field on Account can sum the amounts of all related Invoice records.