I want to conduct spatial average (for example, global average) on ERA5 parameters (like precipitation), should I consider the different area of each grid cell and apply area weighting when conducting spatial average?

For the spatial reference of ERA5, please see this web page: ERA5: What is the spatial reference - Copernicus Knowledge Base - ECMWF Confluence Wiki

If I should apply area weighting, how can I calculate the area of each grid cell?

I need your help.