the long answer is that you would have a method in the user-class (looks like a linked list class here) that does this stuff, and it would probably use a hybrid of methods 1 and 2. You want to avoid unnecessary extra variable creation (esp objects) and copying, so note*temp has no purpose, nor does data. But if you were to do validations, you might have "string data;" (read the input as a string, validate it, if its good, continue else ask for data until good) and that your new operations succeeded (here, you can just use the direct pointer though, you don't need an intermediate variable).
and the short answer:
method 1 is better for this snippet. Method 2 accomplishes nothing except wasting time and space. If you can justify the intermediate steps, then you do it. If you cannot, do not. The justification for a string data intermediate is to handle bad user input of 'abc' when you asked for an integer; the string is a different type than the true target (integer).