The space of continuous functions on a set (X) is considered a complete metric space because it satisfies the definition of completeness in the context of metric spaces. According to the information from the search results, particularly from the page "Complete metric space - Wikipedia" (Wikipedia), a metric space (M) is called complete if every Cauchy sequence of points in (M) has a limit that is also in (M).
In the context of continuous functions, the space of bounded continuous functions on (X) is complete with respect to the metric induced by the supremum norm, as mentioned in the post on Math Stack Exchange (Why is the space of bounded continuous functions complete?). The completeness of this space is inherited from the completeness of the real numbers ( \mathbb{R} ), and the underlying space (X) does not play a role in this aspect, as stated in the document from CUHK Mathematics (Chapter 3 The Space of Continuous Functions).
Therefore, the space of continuous functions on (X) is complete because every Cauchy sequence of continuous functions converges uniformly to a continuous function, which is also in the space, thus fulfilling the criteria for a complete metric space.