Trying to spawn an object offset from an instantiated object that isn't always in the same position

Currently I’m trying to spawn a game object that is offset from another game object, the second game object (The object the position will be offset from) isn’t always the same object, nor is it in the same position. To find out this last object I have a list that tracks what object it is.

This is the code for the list

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class LevelGeneration : MonoBehaviour {

    [SerializeField] private List<GameObject> roomsList;
    [SerializeField] private List<GameObject> lastRooms = new List<GameObject>();
    private GameObject _currentRoom;
    
void SpawnRoomFromIndex(int roomIndex)
    {
        _currentRoom = Instantiate(rooms[roomIndex], transform.position, Quaternion.identity);
        roomsList.Add(_currentRoom);
    }
}

Why is last room a list?