Explanation
secede means to withdraw formally from membership of a federal union, an alliance, or a political or religious organization. if the union or alliance becomes unfavourable in future, a member can pull out of it.
A confederation is a union of sovereign states, united for purposes of common action often in relation to other states. Usually created by a treaty, confederations of states tend to be established for dealing with critical issues, such as defense, foreign relations, internal trade or currency, with the general government being required to provide support for all its members. if the union or alliance becomes unfavourable in future, a member can pull out of it.
while A federation (also known as a federal state) is a political entity characterized by a union of partially self-governing provinces, states, or other regions under a central federal government (federalism). The partially self governing states/province do not have sovereignty and as such, are tied to the federation.