When did science start? To answer that, you have to ask, what is the scientific method? My answer to that is you start by observing something, and when you work out what you think made it happen, you try to use it with something else. After you have found a number of successes, you start to induce a hypothesis. Essentially, you have a set of observations, and a rule that conveys set membership. That rule is the hypothesis. You test it further, and sometimes you have success. Sometimes you find the hypothesis was wrong. The ancients, starting off from nothing, will have got it wrong more often than right.
The first example of chemistry would be when ancients found the first fire, and found that if you used it to treat meat, it was easier to eat. Cooking was invented, and all sorts of other potential food was cooked. Sooner or later, wet clay was subjected to fire, and pottery was invented. This was not easy and it did not occur everywhere. There are a number of ancients who never learned how to make pottery. Somewhere along the line some malachite would have been in the base of a fire, and copper made. This heating of various things did a number of good things for people, and a number of not so good ones.
Once you realize you can do things, and you have an objective, you can try something, and if it works, even partially, you can subject it to a number of variations to improve your process. That is science. In ancient Egypt, one of the priorities was to find improved mummification. One of the surprises for us came from an embalming workshop in Saqqara. It was obvious that oils and resins were used, but the workshop contained a number of jars with residues in them (Nature https://doi.org/grqg2w; 2023) and the interesting thing for me is that mass-spectral analysis showed extracts from cypress and cedar trees, which are local, but there were also components from trees that grow in African rain forests, and another material that came from southern India, Sri Lanka and SE Asia. There was extensive trade even at 2000 BC, and the embalmers had obviously tried a lot of materials. The use of resins and plants with antibacterial, insecticidal and antifungal properties were used at least at 6000 BC. By the Pharaonic period, they realised that natron (sodium carbonate with some bicarbonate, chloride and sulphate) offered preservative properties. The natron was probably in solution, and the body would not have been dessicated, although dessication would follow thanks to the Egyptian hot dry air. The high pH of natron would stop any bacterial activity.
Did the ancient Egyptians gain any understanding of what they were doing. This question is more difficult to answer than it might be thought because our records are from scribes who were highly religious, which meant that so much would be recorded in terms of the Egyptian Gods, but the scribes never invented anything. They had to interpret everything in terms of religion. The problem with natron was it would bleach the skin, and the Egyptians did work out that coating the skin with resin stopped the bleaching. It is possible they worked that out because there is a papyrus (The Edwin Smith papyrus) that shows they had a rational and arguably scientific attitude to diagnosis.
The Egyptians were the first to synthesize a coloured pigment: Egyptian Blue, a calcium copper tetrasilicate, which was made by heating silica, lime and copper oxide in a flux of borate. By altering the ratio they could also make a green colour. They also made coloured pigments for makeup, including lead sulphide (black), lead carbonate (white, but also laurionite (Pb(OH)Cl) and the white powder phosgenite (Pb2Cl2CO3). These latter two had to be synthesized, and while PbS is found naturally as galena, the ore is shiny, and you will get better black with precipitation. For those who are horrified by the thought of putting lead sulphide on the skin, it is totally insoluble and could never pass through the skin.
They were also skilled at metalworking, and had a technique for soldering of gold jewellery that is of interest. They glued the objects together and put powdered malachite into the glue. When this was heated, the glue reduced the malachite to molten copper, which welded the objects together. Finally, they were good at making perfumes, and had developed techniques like distillation. They may not have had a full understanding of what they were doing, but they had a procedure by which they learned things.