In this paper, we study various cosmological parameters and quantities in scalar–tensor gravity (STG) from inflation and swampland conjecture. Therefore, by selecting different models as power-law, exponential, and logarithmic in the framework of scalar– tensor theory, we obtain potential, tensor-to-scalar ratio, and the scalar spectral index. Next, we examine new constraints and compare the corresponding results with the latest observable data. Here, we take advantage of the obtained results and determine the compatibility or incompatibility of the corresponding model with the swampland conjectures