Hello Anurag,
You can create a roll-up summary field to display a value in a master record based on the values of fields in a detailed record. The detail record must be related to the master through a master-detail relationship. For example, You can perform different types of calculations with a roll-up summary field. You can count the number of detail records related to a master record. Or, you can calculate the sum, minimum value, or maximum value of a field in the detail records.
For more information:- Read here.
Thanks.