There are several colleagues and friends around me who have turned from software engineers, Machine Learning engineers to PM or TPM (Technical Product Manager). Because of their background, communication with the engineering team is usually not a problem, but instead, it is necessary to increase the understanding of user needs, market research, competitor analysis, product positioning, and business judgment.
Generally speaking, it is easier company banner design to change jobs within the company, especially in some departments that develop complex technical products, or internal products of the company (users are other departments of the company, not external customers), which are often dominated by technology. There may not be a PM at the beginning.
Once a product management need arises, an engineer familiar with the technology is likely to become the first PM. A similar situation may occur in technology-led startups. In my previous article, I mentioned the work of a new PM. If you are interested, you can refer to "A few things I learned as a product manager in the early days of Silicon Valley! > one article.