"Oh I get this error! I searched for that error and couldn't find the
solution. May you help me to solve?"
A software developer. Many people can fake development by being cut-and-paste experts, but real developers read the documentation, read the code, and learn how to work with systems. The internet is an awesome tool; but, not so much when it replaces problem solving with cut-and-paste.
What library should I use for authentication part?
A Product Manager if the authentication is part of external systems that require specific authentication features.
A Software Architect if the authentication is part of an integrated platform that shares components or features with other parts of a greater whole, in which case the archtect will (if you have a good one) indicate the required features.
A Software Developer if the needed features are known, and they are tasked with selecting a library that supports the features.
The Legal Department if the selected items contain licenses that could negatively impact the product's release.
Which of these modules is better to use on our mobile version app?
A Software Architect if the module is part of a larger whole and one wants to assure that the whole fits within a framework that solves the problem without extra effort or obvious maintenance trade offs.
A Software Developer provided that they understand the required features of the needed module. Remember that better is "easier for a developer to use", so the developer's opinion is fact in determining better, as long as the features are present and there are not additional architectural requirements.
Things work absolutely different than what you think. Most CTOs take input from their Product Managers and Software Architects to address customer needs and development plans. Then they issue directives and money to satisfy the customer needs by following an architect's plan. Smaller items that don't require a change in architecture and handled like "maintenance" items (even if they add new features). A good CTO doesn't need to know technology as much as they need to know finance; but, if they have technology knowledge, they can do their research on the current direction, and act as a second opinion on proposed plans.
In many cases, many places don't run this way, which helps contribute to "the mess" that is software development.
- Developers create architecture, often without additional time to do so. This leads to more poor architectural choices, which create long term costs.
- CTOs act as architects, meaning they lose the opportunity to grow revenue streams by focusing more attention to product solutions over customer needs.
- Product Managers act as team leads, directing their attention away from gathering and tracking customer needs, reducing the ability to react to the market.
- Many smaller shops can't staff all of the required roles, so roles are "shared within a single person" and it is rare (but possible) that the person excels at all the roles, and even more rare that they manage their time to do all of them well.
In your case, you have a person filling the role of Developer who isn't really prepared for their role. Perhaps that's due to poor requirements; but, requirements are never perfectly detailed. It is the developer's job to translate the under-specified requirements into a working product. At a low level "which library does this best" they will be the decision maker of what "best" means. These kinds of questions are the hallmark of a junior developer, or a person who just learned a programming language without learning much about their craft.