In order to typeset the LaTeX logo with a function, save latex-logo.typ in your working directory and write:
#import "latex-logo.typ": LaTeX
#LaTeX
If you simply want to replace all occurences of the string LaTeX in your document with the LaTeX logo, you can additionally use a show rule:
#show "LaTeX": name => LaTeX
LaTeX
lovely work - one issue is that at the end of a line Typst chops it midway whereas it should be non-breaking:
