you all can use terraform cloud to create organization and workspace then add it to your terraform file then using terraform cloud page connect with your GitLab or GitHub and it will run when there are commits to your main branch
Hope it's useful
Thanks Aditya Tripathi for the blogs really appreciate