The EU Treaty contains the following:
Artic1e 8.1 The Union shall develop a special relationship with neighbouring countries, aiming
to establish an area of prosperity and good neighbourliness, founded on the values of
the Union and characterised by close and peaceful relations based on cooperation.
2. For the purposes of paragraph 1, the Union may conclude specific agreements with
the countries concerned. These agreements may contain reciprocal rights and
obligations as well as the possibility of undertaking activities jointly. Their
implementation shall be the subject of periodic consultation.”
The EU is very bad at getting on with its neighbours. This is despite the clear legal requirements it has imposed on itself through the Treaties to have good relations with neighbouring countries and to advance free trade with them. The EU has led Turkey and Ukraine to believe they could become full members, enticing them into signing up to very restrictive Association Agreements that have caused them problems. The EU has allowed a lot of fences and walls to b e put up from Ceuta in the west to Hungary in the east to try to stem the flow of migrants as it struggles to control its own borders.
Since the UK left the EU and its single market the EU has gone out of its way to try to drag the UK back into membership by its excessive and unfair interpretation of the Northern Ireland Protocol. France has taken UK money to assist in stemming the people smuggling across the Channel but delivered limited results. The EU as a whole keeps sending large bills which it claims we still owe even though we are no longer members and no longer receive any money back from their general budget. Many other countries around the world have found it difficult or impossible to negotiate a free trade agreement with the EU.
The UK has been too tolerant of EU behaviour, and needs to be more independent to deliver the Brexit the majority voted for.