Automatic country code detection is a great feature in forms. Forms are smart enough to recognize the location of the person that has accessed the page. The only action on your end is to ensure you’re using a phone field in a form for this to apply.
You’ll see the phone field has a country flag next to it. That flag should be the country you’re physically located in, as the person accessing the form. (In the video and screenshot examples, it is USA.)