One can generalize the notion of residual finiteness to universal algebra. An algebraic structure $A$ is said to be residually finite if $A$ is isomorphic to a subdirect product of finite algebraic structures. Equivalently, $A$ is residually finite if for each $a,b\in A$ with $a\neq b$, there is a homomorphism $\phi:A\rightarrow B$ where $B$ is a finite algebraic structure and $\phi(a)\neq\phi(b)$.
As it was observed by ADL in the comments, one can use the fact that free groups are residually finite to conclude that free monoids are also residually finite as a corollary (on this site, here is a collection of proofs that free groups are residually finite).
But hereWe may also establish residual finiteness of $A^*$ using monoid homomorphisms $\phi:A^*\rightarrow M$ both when $M$ is always a proof that the free monoids are residually finite whichgroup and when $M$ is simpler thanfar away from being a proof that the free groupsgroup.
If $R,S$ are simplersets, then $R^S$ denotes the set of all functions from $S$ to $R$.
Let $A$$A,B$ be a finite setsets. Suppose $*:A\times B\rightarrow B$ is a binary operation $*$. For each $a\in A$, let $L_{a,A,n}:A^n\rightarrow A^n$$L_{a,*,n}:B^n\rightarrow B^n.$ be the mapping defined by letting $L_{a,A,n}(a_1,\dots,a_n)=(a,a_1,\dots,a_{n-1})$$L_{a,*,n}(b_1,\dots,b_n)=(a*b_n,b_1,\dots,b_{n-1})$. We can define a monoid homomorphism $\phi_{A,n}:A^*\rightarrow (A^n)^{A^n}$$\phi_{*,n}:A^*\rightarrow (B^n)^{B^n}$ by letting $\phi_{A,n}(a_1\dots a_r)=\phi(a_1)\dots\phi(a_r)$$\phi_{*,n}(a_1\dots a_r)=\phi(a_1)\dots\phi(a_r)=L_{a_1,*,n}\dots L_{a_r,*,,n}$. Then $$\phi_{A,n}(a_1\dots a_n)(b_1,\dots,b_n)=a_1\dots a_n,$$$$\phi_{*,n}(a_1\dots a_n)(b_1,\dots,b_n)=(a_1*b_1,\dots,a_n*b_n).$$
Observation 1: If the operation $*$ is left cancellative, then the mapping $\phi_{*,n}(a_1\dots a_n)$ is injective, so $\phi_{*,n}[A^*]$ is a subgroup of $S(A^n)$. This shows that the inputfree monoid embeds into a product of symmetric groups.
Observation 2: If $a_1\dots a_n$$A=B$ and the operation $*$ satisfies $x*y=x$, then the semigroup $\phi_{*,n}[A^*]\setminus\{e\}$ satisfies the identity $x_1\dots x_ny_1\dots y_n=x_1\dots x_n$. This means that $A^*$ can be recovered fromembedded into a product of monoids $\phi_{A,n}(a_1\dots a_n)$$M$ where $M\setminus\{e\}$ is a subsemigroup that satisfies the identity $x_1\dots x_ny_1\dots y_n=x_1\dots x_n$.
There are other constructions for embedding $A^*$ into a product of non-group-like finite semigroups.