In addition to a blocked/bad vent(either separate or part of a combo fill) You could have a low loop in the vent hose. If this problem is newish and you haven't replace fill and/or vent hoses, a low loop is unlikely
You could have blocked fuel line itself. A somewhat common problem is some foreign object obstructing the fill hose. The cap liners from additive bottle are a common culprit.
First determine if you have a combo fill.vent fitting. If not, check the separate vent thru hull. As mentioned. bugs, nests and crud buildup are common.
If the problem with filling gas happens as frequently with an empty tank and a mostly full tank, a blocked fuel line is more likely. If the problem seems to happen less when the tank is emptier, you are more likely to have a blocked vent. ( more air space in the tank so it takes longer to build up enough back pressure to trigger the nozzle shut off feature)
Try running a small snake down the fill hose to see if you can clear any obstruction. Make sure the wire or snake you use has a plain end, not hooked. A hooked snake can get caught in the fill and will be very difficult to remove..( To be honest, this suggestion has not been super productive in my experience)