Getting the NIE or Número de Identificación de Extranjero is probably one of the first things you will do. At least if you are planning to actually move to Barcelona and planning to stay for more than 3 month.
Me and my family are from Germany so I will describe what you will probably need as a EU citizen, since that’s what we went through.
The NIE is basically needed as a foreigner to work, pay taxes, receive benefits or do anything with contracts, you will even get asked for your NIE when you receive a parcel. It is basically your identification number in Spain where Spanish nationals have the corresponding NIF.
If you want to stay longer than 6 month, you have to have one.
There are three different kinds you can have, just the NIE number for when you are planning to stay up to 3 month, the NIE card for long-term like actually living and working here or after 5 years the residency.
I will describe what I had to do get the NIE card for me, my wife and son. Hopefully all that information is still valid, but don’t take it for granted.