The First Minister says he will work with opposition parties to keep Nigel Farage’s Reform UK “locked out” of power at Holyrood.