What's a good (cheap) soundcard to get?

Intergrated sound cards like Realtek ones, are not bad at all (in terms of audio quality).
Your sound issue is simply due to improper configuration.

Keep in mind that even if you buy a PCIe sound card it may behave the same way as the motherboard integrated Realtek sound card unless stated in its user manual, that is, physically unplugging the jack cable may cause the computer to switch off this channel, causing any application that uses it to abruptly lose the connection.
That is why anyone would recommend buying an external interface. No one is asking you to buy an audiophile interface, if you are on a budget, just get a Behringer UMC202HD which have multi-client asio driver.

I have shared additional technical information on your other Topic