This is an area every electrician should know, and the answer depends on what code cycle you are on.
GFCIs are section 210.8
AFCIs are secction 210.12
Big difference between 2017 and 2020
I guarantee you, an electrician in Wisconsin should not be asking about AFCI requirements from an electrician in North Dakota.
Different AHJ, different rules.
As a side note: this is partly why the forum encourages you to include your location in your profile.