$cosmo_atoms is using the traditional syntax also used for $atoms, so you need to add the atom numbers. If you are not using the simpler format in $atoms, you could just copy and paste the lines from $atoms that belong to am.
For example:
$atoms
am 1 \
basis =am def-TZVP \
ecp =am def-ecp \
copy that to
$cosmo_atoms
am 1 \
radius = 2.44
In this case Am is the first atom in the list of coordinates, so it is just a 1 here. Could be 2,5-6,12 for example.
The backslash at the end of the first line is important...