This page of our guide to Ghost of Tsushima has a description of the battle with Kojiro - this boss appears in The Six Blades of Kojiro side mission.
Kojiro will appear after you reach your last location, that is, after eliminating all 5 opponents. Unlike other bosses that have already occurred in mythical stories, Kojiro often attacks your hero.
So try to defend yourself and avoid the incoming strikes of your enemy. Only use the perfect moments to launch your attacks. Don't perform any additional strikes.
It is worthwhile to protect yourself before entering the boss area and recharge your Resolve (represented by the yellow circles above the health bar). This way, you will be able to heal yourself or inflict damage with special abilities.
Use all available abilities that you have acquired through previous mythical missions to defeat your opponent as quickly as possible.