Securities pay dividends at regular intervals determined by the issuer. It is usually monthly, quarterly, every 6 months or annually.
If you sell the security before the next dividend payment, you will still receive an adjusted dividend amount. The amount is calculated based on how long you were invested in that security for that period. The dividend will be paid out by the issuer on the next scheduled regular date.
If your portfolio/account was closed or transferred out, you will continue to receive the dividends due. You can decide if you want those dividends paid directly to your nominated bank account or have them transferred to your new ETF provider.