Put differently, do science historians need to explain, say, the discovery of thermodynamics in a mathematically rigorous manner like a physicist would? Or can they omit the highly technical aspects of thermodynamics from their study and just focus on relevant records written in a language accessible to them?
A scientist learns the history of their science out of interest or because it is considered didactically useful. Chemists for example learn quite a few of the older, long disproved atomic models because many chemistry educators think it helps to understand the concepts (I tend to agree). To learn chemistry, the chemist needs to understand the logical or experimental steps from Thompson to Rutherford to Bohr and onward. So scientists will look at the history of their discipline with the intellectual toolkit provided by their discipline.
A historian of science takes a broader look at how and under which conditions those earlier models came about. How were Thompson, Rutherford and Bohr available to work? How did their environment likely influence their findings? How were scientific findings received at a certain point in time? Here I struggle to find good examples, because I've sat in chemistry lectures but in none on the history of chemistry. Note that many scientists are also history of science geeks. Historians of science will look at a discipline with (hopefully) a basic understanding of this discipline, but mostly with a historian's intellectual toolkit.
You did not ask, but you might also want to look at the philosophy of science: Some philosophers of science think about how a scientific statement can have any authority, that's where concepts like positivism come from. Other philosophers of science like Kuhn and Feyerabend looked at the history of science, trying to come up with theories to describe how actually existing scientists work. For the difference between history and other social sciences see this question.
I'm going to flip this question around and first answer whether scientists-in-training need to study their field in a historically rigorous context. The answer is that they don't. One does not need to read On the Origin of Species to gain an understanding of evolutionary biology, nor does one have to read Philosophiæ Naturalis Principia Mathematica to understand Newtonian mechanics.
I'll focus on the latter because I know that field. Reading Newton's Principia will not help one understand physics. It will help one understand a part of Newton's brilliance, but that is the focus of history of science rather than science. One of the very first things students of physics are taught is the concept of a vector. You won't find that in the Principia for the simple reason that vectors as used in physics postdate Newton by a couple of centuries. The next concept is Newton's second law, but written as F = ma (or possibly F = dp/dt). You won't find either of those in the Principia, either. One reason is that Newton didn't use vectors, as explained above. Even more important is that he did not use calculus in his Principia. Explaining why this is so is a matter for historians of science rather than physics educators.
This happens all across the sciences, technology, engineering, and mathematics. What is taught, at least initially, presents a nice consistent picture of the field, one that is all wrapped up in a pretty package complete with a pretty bow. It's only until one gets to graduate school (or working professionally) that one finds the current state of the field in which one specializes in is a hot mess of mostly poorly written papers, with the best ones being hotly contested. Looking back on the history of science, one finds that science has almost always been a hot mess. Until it's absolutely essential (i.e., graduate school), educators of science avoid that hot mess. It gets in the way of the goal.
Now to answer the question at hand: Historians of science look for those historical hot messes. That's when the interesting stuff happened. Just as students of science don't have the time to learn how their field developed, students of history of science don't have the time to learn the details of the field. They need to learn how the field formed.
This is an extended comment. The words "need" and "can" in the question have no precise meaning. There are various types of historian of science. Some go into details, with various degrees of rigor, some don't. Both types of history can be interesting in principle. However unfortunately there is a large class of historians of science who simply do not understand enough the science they write about. They use whatever they need about science from popular secondary sources, or restrict themselves to many literal citations, without really understanding the text they cite.
Here's an example of the difference between The History of Science versus Science.
Let's say you're interested in the History of Physics and you want to know more about the origins of Gravitational Theory, you would probably begin reading or reading about Aristotle's erroneous theory of Gravity which was corrected by Galileo nearly 2000 years later at The Leaning Tower of Pisa-(Galileo's Gravitational experiments at Pisa essentially opened the door to Modern Gravitational Thought). Subsequent to Galileo, was of course, Isaac Newton and his famed, Apple Tree at his Cottage in Central England. From that point onward, Newton essentially invented our understanding and interpretation of the Universal Laws of Gravitation. One could perhaps go back to Archimedes' bathtub and his discovery of the laws of Buoyancy......."Eureka, Eureka!"
If you notice, there is a pattern to The History of Science whereby the Historian of Science is interested in the details of the Inventor's life....What he invented, how and where did it come into existence and above all......When did his inventions become famous and during which period in world history? These are questions that typically preoccupy a Historian of Science or one who is studying the History of Science.
However, if you are an actual Physicist or Scientist, you may or may not necessarily preoccupy yourself with or even care about the minutia of the Inventor or Scientist's life and times. If you are a Physicist or Physics College Professor, does it really matter that Archimedes conducted nearly all of his experiments on the island of Sicily? or that Galileo taught Mathematics and/or Physics at The University of Padua? or that Isaac Newton conducted many of his early experiments at his Cottage in the English Midlands? Inventors and Scientists, probably would not care much about these topics; they are too busy and too involved with the invention and the science itself-(and a few of them, are probably hoping to become the next Einstein, Planck, Newton or Galileo).
I am sure there is a percentage of Inventors, Scientists and Physicists who have some historical, geographical and biographical background, as well as a small percentage who have a detailed and erudite background in the History of Science.
However, without sounding too stereotypical or simplistic, Inventors and Scientists are trying to pioneer the future, (as they have been doing since Ancient times), whereas the Historian of Science is reflecting and narrating the prior accomplishments and achievements of the Inventors and Scientists. In other words, one group is literally discovering and building for the future, while another group is chronicling the origins of such landmark discoveries and inventions.