2011 wrx Subaru really bad idle

Good idea w/a misfire on 2 code to remove & inspect the number 2 spark plug and its coil. There’s probably a relatively easy to do resistance test on the coil, if you can find the procedure. While in the area check out the injector’s wiring & connector for any signs of problems. The codes definitely seem to be related to the turbo. But that might be a symptom, not the cause.