您可以在矩形末端使用箭头。
\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\draw[line width=1ex,gray!50, {Butt Cap[black]}-{Butt Cap[black]}] (0,0) .. controls (1,-1) and (2,-1) .. (3,.5);
\end{tikzpicture}
\end{document}
