Welcome to Flyer talk
milkshakes
Since Germany and Spain are both in the Schengen zone, there is no customs or immigration to clear at BCN.
If your flights are on a single booking then your bags should be checked through and you just need to make your way to the gate for the onward flight at BCN (may require a terminal change and reclear security).
However if your flights are on separate tickets and you have checked luggage then you are not likely to make the onward flight before check in closes.