Why it matters
There's a pre-emigration task I strongly recommend because it will simplify your expat investment and tax life. It’s based on the reality that you won't escape the US tax system by moving abroad (assuming the IRS already knows of your existence).
IRS suspicions
The IRS treats most foreign (non-US) investments differently, and more harshly, than it treats US investments. For example, popular pooled investment vehicles like mutual funds and ETFs purchased abroad will get worse tax treatment by the IRS than will US ETFs.
Normally, you can't invest (buy and sell) US products when you live abroad. This means that your investment options will narrow considerably.
Trading in the foreign country where you live will typically lead to expensive US income tax complications. For example, if you own an ETF you'll have to file a complicated and expensive form with the IRS about it every year.
Work-around
Having a US brokerage account as an expat would allow you to trade on US markets, which would make your investment and tax life much simpler.
The key step is to open a US brokerage account before you emigrate -- even if you don't use it right away. Such an account will enable online access to US markets from abroad.
Important details
There's a catch: opening such an account will require a continuing US address for the account. You'll need a residential address, not an unmonitored post office box or an address with mail forwarding services. Annual tax forms from the broker would arrive at this address, so a cooperative relative may be able to help you out.
There’s a second catch: once you're abroad, you should probably use a VPN (virtual private network) router for use with your home computer. A VPN protects your privacy in a variety of ways. Crucially, it hides your computer's location when you're online.
A VPN is important because many US brokers and banks have closed the accounts of clients they determine to be accessing their account from a foreign location.
The advantages
How your country of residence would tax your US investment proceeds I do not know. However, the treatment of your US investments by the IRS would be routine and far less expensive in terms of tax preparation charges than if they were non-US in origin.
Another advantage of a US investment account would be its access to one of the largest and most diverse markets in the world.
Before you leave
If you're interested in trying a VPN, Proton (a highly regarded Swiss email provider) offers a free basic VPN. Proton has been the choice of many Russians who want to bypass censors to get internet access to news from outside Russia. See https://protonvpn.com/ for details on their free plan.