It has been said that "trial courts do not create precedent." Can a trial court create precedent?
Yes, trial courts can set precedent on questions of law. See generally R. v. Sullivan, 2022 SCC 19 and Re Hansard Spruce Mills,  4 D.L.R. 590 (B.C.S.C.). Trial judges of coordinate jurisdiction are bound by the ordinary principles of horizontal stare decisis to follow prior judgments made by other trial judges of the same court (subject to limited exceptions). See Sullivan, paragraphs 44 and 75:
 A superior court judge in first instance [i.e. a trial court] should follow prior decisions made by their own court on all questions of law, including questions of constitutional law, unless one or more of the exceptions in Spruce Mills are met.
 The principle of judicial comity — that judges treat fellow judges’ decisions with courtesy and consideration — as well as the rule of law principles supporting stare decisis mean that prior decisions should be followed unless the Spruce Mills criteria are met. Correctly stated and applied, the Spruce Mills criteria strike the appropriate balance between the competing demands of certainty, correctness and the even-handed development of the law. Trial courts should only depart from binding decisions issued by a court of coordinate jurisdiction in three narrow circumstances:
- The rationale of an earlier decision has been undermined by subsequent appellate decisions;
- The earlier decision was reached per incuriam (“through carelessness” or “by inadvertence”); or
- The earlier decision was not fully considered, e.g. taken in exigent circumstances.
To be clear: courts of coordinate jurisdiction are bound as a matter of stare decisis unless one of the above exceptions are established:
 ... [the judge] was bound to follow precedent because as a matter of horizontal stare decisis, [the previous judgment] was binding on courts of coordinate jurisdiction in the province as a matter of judicial comity, unless an exception to horizontal stare decisis was established.
Generally speaking, a trial court ruling does not create a legally binding precedent in the United States. A court's rulings are only binding on courts that appeal their decisions to that court.
Unlike Canada, court in the United States do not generally observe "horizontal stare decisis". It isn't uncommon in the U.S. (in both the state and in the federal court systems) for different judges in the same trial court to rule differently on a legal issue upon which there is no binding appellate precedent.
This said, a well reasoned unofficially reported order of a trial court, usually, but not always, a federal court, reported in West's Federal Supplement Reporter, can be a persuasive precedent that informs another court's ruling on the strength of its reasoning and analysis from a presumptively impartial person, rather than because the principle of stare decisis (which is the rule that courts must follow precedents when they apply) binds or limits the court.
Trial court rulings are particularly commonly referred to in interlocutory matters like discovery disputes or bankruptcy procedures that are difficult or impossible to obtain appellate review of, to provide guidance for reasonableness in matters reviewed for abuse of discretion (like attorney fees awards), and to gain insight into rarely litigated statutes, and to gain insight into newly enacted legislation for which not enough time has passed for any binding appellate authority to exist.
Also, while it is not precedent, the doctrines of res judicata and collateral estoppel (a.k.a. "claim preclusion" and "issue preclusion") prevent re-litigation of disputes and legal issues between parties to a previous case in which they are someone legally related to them was involved.
For example, if NATIONAL CORPORATION loses a products liability lawsuit in a case against INJURED CONSUMER, in a case that is reduced to a "final judgment" on the grounds that the product they made had a defective design, the defective design ruling is binding against NATIONAL CORPORATION in a lawsuit against SECOND INJURED CONSUMER who must still, of course, prove that the defective design caused their particular injury. This could make the case of SECOND INJURED CONSUMER much easier to win.
Can a trial court create precedent?
By all means.
Certain cases get tried in the High Court, which is not the lowest one in the hierarchy:
- Certain criminal cases may or must be tried in the High Court
- So do some civil cases. Especially judicial reviews.
So, guess what. In any such a trial, if there is a question of law resolved (along with fact-finding), this resolution inevitably becomes a binding precedent on the District Court.