Any subset of a finite topological space is compact. So if $X$ is finite and we have a function $f: X \rightarrow Y$, the preimage of any (compact) subset of $Y$ will be compact in $X$. Thus, to find counterexamples, it suffices to find a finite set $X$ together with a function $f:X \rightarrow Y$ that is not continuous.
Looking at small topological spaces, we can construct such a function explicitly. For instance, let $X$ be the topological space of $3$ points $\{a, b, c\}$ with open sets $\Big\{\emptyset, \{a\}, \{b\}, \{a,b\}, \{a,b,c\}\Big\}$, and let $Y$ be the topological space of $2$ points $\{x, y\}$ with open sets $\Big\{ \emptyset, \{x\}, \{x, y\} \Big\}$.
Define $f: X \rightarrow Y$ such that:
$$\begin{align}
&a \mapsto y
\\ &b \mapsto y
\\ &c \mapsto x
\end{align}$$
Though $f$ is proper, we can see that $f$ is not continuous since $\{x \}$ is open in $Y$, but $f^{-1}\big(\{x\}\big) = \{c\}$ is not open in $X$.