I was planing on flying from Denver to Aspen this morning. I did all the normal procedures for a flight. When I was ready to takeoff I requested for takeoff from the tower. The tower said, “cleared for take off stay at runway heading until 8000ft.” So I took off and everything was going to plan. I then switched to Denver Departure as instructed by the tower. I let the controller know I was on his frequency by checking in. I was at about 9000ft when I need to turn west and head for Aspen so I started to turn left. After I was almost done with the turn I realized I passed pretty close with another aircraft. Soon after I was immediately reported by the ATC I’m pretty sure the controllers name was Evan something. The controller didn’t give me any instructions on how to avoid it and/or give me an waring. I just felt like I was following instructions and the least the controller could of done was tell me to change heading or give me some kind of warning or advise for the future. Any advice on what I could have done differently? What the reasoning was for immediate report?

@Ethan_Hansen is your controller. He’ll message you to discuss this. Callsign N200FT