If you want to go to a potluck dinner, but don’t want to or can’t cook anything, ice cream can be a good thing to bring.
There are other things people who don’t want to or can’t cook sometimes bring, and they’re not rude exactly, but people who bring those things are often perceived as lazy or…
I have also seen good results from those huge veggie trays with dip. While people bring them a lot nowadays, in my circles at least they are incredibly popular. Probably because ice cream melts between the car and the office here.
Also, if you bring one of the easy ones, and say you didn’t have time to cook or you were out of an ingredient and these looked good.
The issue with store-bought cookies and cake/cupcakes is they don’t taste very good in comparison. This can be mitigated on the cookie front by not bringing in typical chocolate chip cookies - actually but them in the cookie aisle not the bakery and put them on a tray yourself. And avoid oatmeal raisin - even people who like raisins hate stealth raisins when they expect chocolate chips.
If all else fails, offer to bring plates, cups, napkins and cutlery. These things are often forgotten and being that person makes you a hero to those who have had to eat off paper towels in the past.