Hey there,
To help figure out what is causing this I just need a bit more context.
Since he is playing on a Switch 2 does his Nintendo account actually have an active Nintendo Switch Online membership? That subscription is required by the console for any online play.
Also when you changed the privacy settings to allow multiplayer did you log into your own adult Microsoft account and modify his child account from the family management page?