Welcome to EBPF! Sorry to hear of troubles already with the '17 ... Most times, a rattle on EB engines is heard at startup, where it lasts a brief second or two. If the rattle is extended, it is almost certainly due to the timing chain(s). Inadequate oil pressure/timing chain stretch are believed to be the culprits. Transmission programming tends to not be so good from the factory, and aftermarket tunes take care of that.
If you want to DIY, you can take the appearance cover off and poke around a bit to see if anything is loose. I would limit it to that, the vehicle being so new. If nothing jumps out at that point, take it in to the dealer, make sure a tech rides with you and demonstrate what is going on. It could be a blowoff valve, it could be a turbo at spindown, let them figure it out.