EGR maybe. It should be shut at idle, it could have failed open on you. I’m with Goose 100%, you need it scanned. Because it could be several items, especially since you didn’t give a whole lot of information. Anyway, checking out and cleaning the EGR is easy and free.