Strictly speaking a marriage is a long term partnership between individuals while the wedding is the ceremony where the partners enter into this union.
In most countries laws regulate the marriage, e.g. who can be married, at what age and specific rights and obligations for the partners.
The wedding ceremony is rarely guided by laws (but often by culture and tradition). Many people can be invited to the wedding, - but only the couple to the marriage.
This is a good explanation, but the celebration usually takes place only after the marriage becomes a fact. There are different types of marriage, it can be legal or it can be religious. These two types might be non-overlapping in a given country. Thus the young couple might have two weddings on two different days and even at two different places: a legal wedding and a church wedding. The Duo Italian team might have had the same thoughts as they did accept "The wedding is not legal."
However, as of 2016, same-sex civil unions are legal in Italy. https://journals.sagepub.com/doi/abs/10.1177/1363460717713386
There's a difference between a marriage that isn't legal meaning it's not recognised by the government / state as a marriage (e.g. if you threw a wedding for your pet dogs), and a marriage that is illegal meaning it's breaking the law (e.g. if you're still married to someone else).
Getting married in Italy appears to be a complicated and bureaucratic process: https://www.justlanded.com/english/Italy/Articles/Visas-Permits/Marriage-Divorce-in-Italy