Should a Product Designer Know How to Code?
You do not need to be a software engineer to be a good product designer.
You do need enough understanding of code to know what is cheap, what is expensive and what is impossible. The gap between can code and understands engineering is the part that actually matters, and only the second one is required.
Why it makes you better
When you understand how things get built, you stop drawing fantasy products.
You know which interactions are trivial and which will cost the team two sprints. You spend your design effort where it changes the product instead of where it looks impressive. You catch the problems before handoff rather than in the meeting after.
Since I write code as well as design, the clearest effect I notice is on decisions made early. That is where the leverage is, and technical fluency is what lets you make those decisions with any confidence.
How much is enough
Working fluency, not mastery.
HTML and CSS. A rough sense of how a frontend framework renders. What an API is and what it costs to call one. Enough pattern recognition to guess when something is hard.
That is usually enough to talk to engineers as a peer and to price your own ideas before you present them.
What it does for a career
Designers who understand engineering get trusted with bigger decisions, because the people making those decisions can tell the difference.
Pair that with business sense and you are in a small group: designers who can follow a pixel all the way to revenue and explain the path out loud.
Questions I get asked
Do UX designers need to code? Not to a professional standard. Basic fluency in how things are built makes their work more realistic and, frankly, better received.
Does AI remove the need? It removes some of the production work. That makes judgment about what to build, which depends on knowing what is feasible, more valuable rather than less.
What should I learn first? HTML and CSS. Then enough JavaScript and framework basics to understand how a design becomes a real screen.