if you replace a panel you would need to ensure the grounding and bonding is code compliant. There is no exemption because it is existing when the scope of work is panel replacement. You may be required to upgrade other things in the panel if there are some obvious violations, as you cannot connect up something unsafe. The inspector may also request some branch circuit upgrades if the panel is really old, such as some additional kitchen circuits.

Definitely a good idea to chat with the inspector before pricing out the job so that there are no unpleasant surprises.