Can you put AFCI and GFCI on the same circuit?
Yes, and on a lot of modern residential circuits you are required to. Arc fault protection and ground fault protection solve two different problems, they live in two different code sections, and nothing in the NEC treats them as alternatives to each other.
Two separate rules, two separate hazards
Section 210.12 of the 2023 NEC requires arc fault circuit interrupter protection for 120 volt, single phase, 15 and 20 ampere branch circuits supplying outlets and devices in dwelling unit kitchens, family rooms, dining rooms, living rooms, parlors, libraries, dens, bedrooms, sunrooms, recreation rooms, closets, hallways, laundry areas, and similar rooms or areas. AFCI watches the waveform for the signature of a series or parallel arc, which is a fire hazard.
Section 210.8 requires ground fault circuit interrupter protection based on location. For dwelling units, 210.8(A) lists bathrooms, garages and accessory buildings, outdoors, crawl spaces, basements, kitchens, areas within 6 feet of a sink, boathouses, bathtub and shower areas, laundry areas, and indoor damp and wet locations. GFCI watches for current leaving the circuit through a person or through earth, which is a shock hazard.
A kitchen small appliance branch circuit sits in both lists. So does a laundry circuit. Those circuits need both forms of protection, and the code does not let one substitute for the other.
Three ways to get both
The simplest is a dual function circuit breaker, listed as combination type AFCI and Class A GFCI in one device. One breaker, both protections, whole circuit covered from the panel out.
The second is an AFCI breaker at the panel feeding a GFCI receptacle at the first outlet, with the downstream receptacles fed from the load terminals. That is fully compliant. Section 210.8 permits the protection to be at the receptacle, and 210.12 permits a listed outlet branch circuit type AFCI at the first outlet in some arrangements, but a breaker at the panel is the clean version.
The third is a standard breaker plus a dual function receptacle at the first outlet, which requires the branch circuit wiring method between the panel and that first outlet to comply with 210.12(A) exceptions. Read that section carefully before relying on it, because it puts conditions on the home run.
Nuisance tripping and stacking
Putting a GFCI receptacle downstream of a GFCI breaker is legal but pointless, and it makes troubleshooting miserable because either device can be the one that opened. Pick one point of ground fault protection per circuit. Shared neutrals are the other classic problem. A multiwire branch circuit needs two pole AFCI or GFCI devices designed for that use, and a neutral that is landed on the wrong pigtail will trip the device the first time a load comes on.
Field takeaway
Both protections on one circuit is normal and often mandatory. Use a listed dual function breaker when the circuit needs both, keep the neutral for that circuit on the breaker pigtail and nowhere else, and do not stack two ground fault devices in series on the same run.