Hi lost
I repair windows all the time,normally the rot is deeper in the frames then what you see, a good repair can last some time but generally you may just be delaying the replacement time,if the rot is bad then scarfing in new timber is the go,small stuff can be bogged but does crack open after a while.
Hope this helps