In this study, we address the challenge of screening resins and optimizing operation conditions for the removal of 43 perfluoroalkyl and polyfluoroalkyl substances (PFASs), spanning both long- and short-chain fluorocarbon variants, across diverse water matrices, using machine learning (ML) models. We first develop ML models that can accurately predict removal efficiency of PFASs based on resin properties, operation conditions, and water matrix. The model performance is validated by using both a test set and our own experimental tests. The key features from resin properties, operation conditions, and water matrix influencing PFAS removal as well as their interaction effects are comprehensively investigated. We finally target long-chain (e.g., PFOS, PFOA) and short-chain PFASs (e.g., PFBS, GenX), using the developed ML models to inversely screen resins and determine the optimal operation conditions under a specified water matrix. Experimental tests demonstrated that our ML-guided approach achieves the desired removal efficiency (RE) for these PFASs, with RE values reaching 86.56% for PFBS and 83.73% for GenX, outperforming many reported resins. This work underscores the potential of ML methodologies in resin screening and operational optimization across diverse water matrices, enabling the efficient removal of structurally varied PFAS compounds.