The Overhead consumed by SSB will vary with different Bandwidths and SCS configurations. The following are the main factors involved in SSB overhead calculation.
The sum of the Number of PSS, SSS, and PBCH Resource elements (Fixed Values)
Number of SSBs in a frame(Changes based on configuration)
Total Resource blocks (Variables), Total number of slots per frame(Variables)
Total Number of symbols(Fixed Values)
In more simple words, you need to calculate the total number of resource elements being used by SSBs in a frame and then divide it by the complete available resources in the frame.