How come electronics in cellphones are better than professional cameras
Electronics is a very funny business, I should know, that is what my job is. Unlike most other good produced like cars or pens, the actual material cost of manufacturing per unit for an integrated circuit is rather modest. What costs a lot is engineering and development. If you can manage to distribute this high cost over many manufactured units, you will can keep the costs surprisingly low in the order of a few dollars per chip. You just have to sell enough of them.
Mass consumer products, like cell phones sell in the 10s of millions if not more. Even if you spend 100 million in developing a very capable and sophisticated chip, if you sell a 100 million of them, these development costs will only add a dollar per unit sold. However, if you only sell 100'000 units, the development cost of this chip will end up adding 1'000 per unit to the price.
This link gives an estimation of how many cameras were sold by Nikon until 2019. Even if the numbers are not reliable, it is clear to see that high-end cameras like Nikon D5 do not reach those numbers. As a result, the electronics in even a high-end camera can not keep pace with what you can find in a conventional cell-phone. The Wikipedia page on sale numbers of cell phones should give you an idea about how much the difference is.
These pages are for Amateur Photographers and not really for seasoned photographers and professionals. I have no affiliation or commercial interest with any brand/make. I write from my own experience. I ended up using mainly Nikon, so I am more familiar with this brand than others. See price for notes on pricing as well as photography related links.