In short, no.
To elaborate (because I have many thoughts on this!), I'll share a story about a colleague I managed as a result of some organizational restructuring.
I was genuinely excited to have this woman join my team because my observation was that was incredibly effective in her role. Of course, coming to join my team would be somewhat of a departure for her; she was new to product and the role at the time on my team was to drive outcomes that generally required more complicated technical builds. I was asked by this colleague, "Are you looking for someone with technical skills? How can I be more technical?"
Technical skills are great. I value these skills as that's my background. I went to school for Computer Science and spent a good decade getting compensated for writing code. However, as I shared with this direct report, you don't actually need to know how to code to be a good product manager.
What would be valuable instead? Critical thinking skills (which, incidentally, you don't need an engineering degree to exhibit).
I ended up sharing with this colleague information on logical data flows (this article from lucidchart.com is probably the best resource I've seen on the topic). You don't necessarily need to know what language the product is written in but it's helpful (especially in a large, matrixed organization) to know how data flows into and out of your product. And, to be able to clearly map that out in a drawing that simplifies and explains that for others (i.e. folks who are not technical)? That's the secret sauce that I was looking for that I still think leads to success.
To be able to do this, you have to be comfortable with being uncomfortable: learning and uncovering information, piecing things together bit by bit, asking lots of questions (and not being afraid that this makes you look dumb). And then, once you have that understanding of your product at a macro level, instead of micro-managing technology delivery, you can focus your energy on the discovery of opportunities to advance your key results (see the very helpful chart here for guidance on what that means as far as being a good or even great PM!).
Interested in learning how to code? That's great and I welcome you to the community with open arms! But if the only reason you are learning is because you feel you must for a product role, I encourage you to re-think that perspective.