Why two same type components can only set useState in one component type

Hi,
Frontend React.
Could anyone find a solution for my code. Question can be read in javascript - why two same type components can only set useState in one component type - Stack Overflow

Thanks