It depends what you want.
If you mean, "Level is done, go back to the previous scene and continue my script", then you want to use a signal and a yield statement. In your level.gd, you declare something like signal EndLevel
and emit_signal("EndLevel"). In your main scene, you might
yield(levelthing, "EndLevel")` or you might connect the EndLevel signal to some routine which gets called when the signal is emitted.
If you are wanting to update a player record, you might look at singletons.