22 short and long firearms are ideal for self defense and practice. The ammunition costs like 15 cents per bullet (20-30 long rifle) though there was a shortage recently on the latter. If you want to invest a little more, federal sells 22lr bulk, 5000 rounds for $300, which is 16 cents per round
Stopping power isn't actually as important because your goal is to incapacitate the intruder, not kill them. In the end the difference between .38 special and .22 lr is how long it will take the intruder to recover in the hospital, but in an actual firefight they both have the same chance to incapacitate (60%) on chest level or higher
What would really factor into incapacitation chance would be your shot placement, and most .22lr-caliber magazine fed pistols have high capacity and offer more lenience for shot placement than a 6 or 8 shot revolver of the same or larger caliber