Tanzu Hub 10.4 currently supports deployment only on Federation Core for VMware Tanzu v3.3.x (formerly Ops Manager).
Versions 3.1.x and 3.2.x of Ops Manager are not supported with Tanzu Hub 10.4.
Federation Core / Ops Manager must first be upgraded to v3.3 prior to upgrading Hub to v10.4. Reference: Hub release notes.
Recommended best practice is to have a separate foundation just for Hub and attach lower version foundations.
Note: The requirement of 3.3 to install Tanzu Hub tile on 10.4 doesn't impact the ability to attach foundations running on external Opsman 3.1 or 3.2 versions with older 6.x or 10.x EAR tile versions.