This is a six year old house and I noticed that frame is rotting due to elements of nature.
Should I just paint over it? If not, how should I fix this?
The two options that come to mind are as follows:
Rip out the wood and replace it
This is the traditional way to approach the issue. This is labor intensive, but taking the time to remove all of the rotten material is usually the best way to go. Remember, you're just seeing the surface rot. There might be more damage inside. The sooner you get to that damage, the sooner you can stop the spread.
When you get the new wood in place, make sure you prime and paint with good quality, exterior materials.
Inject it with an epoxy resin
This runs the risk of hiding damage and mold issues, but is sometimes expedient / convenient. I recently took this road with my exterior door of my house. I'm planning on eventually replacing the entire wall of doors and windows, but couldn't quite swing that on day one.
Instead, I removed the source of water (a huge dog house on our deck left by the previous owner that was shedding water directly onto the door), let it dry and injected copious amounts of epoxy. I happened to use the West System and it turned out great (I have no relationship with the company).
If you go this route, it's worth reading a bit about the right resin and filler to use for your application. In my case, I didn't care about appearance so I used the strongest combination. You'll want to sand the epoxy to make it fit in, so you'll want to consider that.
The epoxy isn't cheap, but as long as you store it in a room temperature setting, it will keep for years.