The fact that each IBAN code is unique makes many people think it is dangerous to share it with others. However, you shouldn't be afraid to give it out (as long as it's justified). In fact, and often without realizing it, we readily give it to friends or relatives when we need them to make a transfer (for example, to pay for a birthday present), or when paying for an online purchase.
But the thing is, knowing the IBAN code of someone else's bank account only lets you deposit money in it. Under no circumstances can money be taken out, regardless of the amount, and moved to another account without first proving that you own the account, either with an ID card (if the transfer is made in a branch) or, after the implementation of the new PSD2 regulation, by using 2 or 3 of the following authentication factors: something the user knows (a password), something they own (a smartphone) and something they are (their fingerprint).
The only danger, and one thing to look out for, is the possibility of having a bill, such as for light, water, gas or a content platform subscription, debited from your account. These things could happen and they have an easy solution, since the bill could be returned within 13 months after it is paid (estimated time for those direct debit payments that were not authorized by the account holder).