Thank you for the opportunity to help you with your question!
Pure metal like Cu Na Ca they form metal bonds. Pure non-metals like O2, N2 form covalent bound.
Pure noble gas literally don't form bounds and are hold together by Van der Waals force.
So the only thing we have to worry about are those compounds.
Unfortunately, not all metal and non-metals can form ion bonds.
For example in CuO the bound between Cu and O is a covalent bound.
However, keep in mind almost all salt form ion bonds like CuSO4 and CaCl2
Generally, in order for the ion to form you will need the ion to be stable.
For the ion to be stable you have to have enough space to distribute the charge that come with the extra electron or the loss of electron.
So things like NO3 - and SO4 2- are big and contains a lot of non-metal atoms solidly bounded together by covalent bound so that they can distribute the charge better to keep themselves stable.
Metals like Na K only have to lose one electron to reach noble gas like electron shell so their compounds are ionic
Metals which lose two electrons like Mg Ca lose two electron usually form ionic bounds.
Transition metals like Fe and Cu only form ionic bounds with Cl Br I, and acid radicals like SO4 NO3. When they form compounds with O and S they tend to be covalently bounded.
Acids like HCl and H2SO4 will form covalent bound when deprived of water, because H+ ion is so small that it is unstable if not surrounded with water solution. In water they ionize but without water they form covalent molecules, and sometimes are volatile like HCl and HNO3.
Another good criteria is if the crystal is ionic when you heat it to it's melting point it conducts electricity, while covalently bounded compounds will simply disintegrate and chemically become something else.
Please let me know if you need any clarification. I'm always happy to answer your questions.