user_data should be used as it is ideal and user data is native to AWS, and the remote-exec provisioner is specific only to Terraform, which is just a way to call the AWS API.
You can view user_data on AWS console, and often an important part of using Auto Scaling Groups in AWS, where you want each EC2 Instance to execute the same config code when it launches. Terraform's remote-exec provisioner can not do that.
I hope that above information will be helpful to you.