Answer
Euler, in 1734.
Work Step by Step
After a search on the world wide web, with the search phrase
"when was f(x) notation first used",
apparently,
Gottfried Wilhelm Leibniz (1646-1716) introduced the term "function" in a manuscript in 1673.
The notation $f(x)$ was introduced by Leonhard Euler in 1734.
The definition of a function, that we use today, was given by
Johann Peter Gustav Lejeune Dirichlet (1805-1859).