storing references to scene objects in a file

how can I do that? tried it with a scriptableobject and an editor script but that doesn’t work
need it for things like checkpoints, player spawns, doors to other scenes,etc

That’s not possible. Objects in a scene are not standalone assets which could be referenced through an asset id like actual assets (prefabs, textures, meshes, …). Objects in a scene are only actually there when the scene is loaded unlike assets.

When you have a script from another scene that persists and should have access to things in another scene you have to use any of the Find methods or use a singleton manager.