Is the galaxy made of a nebula or the solar system?
No, those are two different nebulae.  There are stars in our galaxy much older than 5.6 billion years.  The problem is that "nebula" is a very generic term, so it can be a whole galaxy or even the remains of a single star.  It's not even clear what is meant by the nebula from which our Sun formed, it could be the giant molecular cloud if our Sun formed in a huge cluster, or it could be something called a "proplyd" (which is much smaller) if the Sun formed in relative isolation.  There are even proplyds that break off from giant molecular clouds in a kind of combined scenario where the GMC forms the proplyd and then the proplyd forms the star.  In any event, it is important to realize that the galaxy formed from a huge nebula some 10 billion years ago, and the Sun formed from a much smaller nebula much later.