Declaring an empty set

Maybe there is a misconception what a set is. Consider

A = Set([1,2]) 
B = Set([3,4])
C = Set([4,5])
D = union(A,B,C)

Note that 4 appears only once in D. Hence you don’t need more than one union to get your desired result.
At least as far as I understood what you want to achieve by your description.
If I look at your code it seems that you try to construct a vector of sets. This would look like

main = []
push!(main, union(A,C))
push!(main, union(A,B,C)) # note that sets do not care about ordering
push!(main, union(A,B))
push!(main, B)
2 Likes