This paper is devoted to the study of the relatively compact sets in Quasi-Banach function spaces, providing an important improvement of the known results. As an application, we take the final step in establishing a relative compactness criteria for function spaces with any weight without any assumption.