A lot of instructors seem to say when you get back on track resume your original heading and other instructors recommend original heading plus the track error.
You have to figure out why you were off track.
If it's because the wind is different from the forecast or plan, then if you go back to your original heading you will just get blown off track again, so you must correct the heading by 1 x drift.
If it's because your DI wasn't aligned to the compass, or you were just flying the wrong heading, then go back to the original planned heading.