Kotaro is an NPC found in the Senpou Temple region and has 3 possible endings to his quest with only one really being the best option.
Step 1 - Speak to Kotaro.
Step 2 - Find the Red and White Pinwheel and the White Pinwheel (both are before the first boss and after the second idol).
Step 3 - Return to Kotaro and now you make an ending choice.
Ending A - Give Kotaro the White Pinwheel and use the Divine Abduction weapon from the Sunken Valley Region to send him away. Visit the area you fought the 4 monkey bosses and he’ll be there and give you an item.
Ending B - If you’ve followed Doujuns Questline up until this point, you can give him the red and white pinwheel and send him to the dungeon area. This will end up resulting in fighting a zombie version of Kotaro at the end of Doujuns Questline. • Sekiro Shadows Die Twice - DOUJUN Com...
Ending C - If you’ve followed Anayama’s quest up until this point, give him the red and white pinwheel and send him to work for the merchant who will now have better items in his store, completing 2 quest lines. • Sekiro Shadows Die Twice - ANAYAMA Co...
Warning: Not sending Kotaro to Anayama will prevent you unlocking the final items from his store and not sending him to Doujun will mean that you’ll need another NPC in the game to take his place or you’ll miss that Questline.