For investment income up to € 1,000 (€ 801 up to and including 2022) or, in the case of spouses/life partners, up to € 2,000 (€ 1,602 up to and including 2022) per year, you can avoid the withholding of capital gains tax (flat rate withholding tax) by issuing an exemption order to your bank. You can obtain the form for the exemption order from your bank.
If your investment income exceeds € 1,000 or € 2,000 per year, the bank may only credit you with investment income without withholding tax if you have submitted a non-assessment (NV) certificate to it. You can obtain a non-assessment certificate from the tax office on request if your income is so low that you do not have to pay income tax on it.