how to insert gravity newsletter subscription form in template

Read the documentation before posting questions.

https://www.gravityhelp.com/documentation/article/creating-a-form/
https://www.gravityhelp.com/documentation/article/embedding-a-form/