Granny Smiths are probably the most tart generally available apple, but any cooking apple in general is usually sharper. You might also like McIntosh or even Pink Lady.
You could also go down the cider apple route or even crabapples if you really want, though they often tend to be more bitter than tart.
Granny Smith is ubiquitous. It's often difficult to get a more sour apple than a Granny Smith. Pink Lady is less sour IIRC. McIntosh or Braeburn are definitely less sour.
If you're in the Midwest (especially MN, WI, Iowa, etc) you can get Haralson, which are kinda like Granny Smith but more just straight sour.
Haralson is probably my favorite. But disclaimer, I also like eating straight lemons, so ... yea. Many people will use Haralson only for baking.
I hear that in Europe they have a few types that are more sour, idk.
When I grew up, we had several crabapple trees in the yard. They very frequently bore fruit. My mom always told me these were toxic to eat, so I stayed away from them. Honeysuckle and blackberries, on the other hand...
As raw fruit they are perfectly edible when mature. The flavor is a mild apple flavor, a little bland an can be sour also. As in all apples, the seeds have cyanide, but as long as you don't eat them or filter the seeds after cooking it, it will not be a problem. Just don't eat it whole.
The immature fruits are hard as a steel ball, so there is a risk of suffocation with children, but apart if this, if you discard the seeds they are perfectly edible. I ate them many times, even if I prefer to let most in the tree for the birds.
> It just means wild apple trees, not a cultivated variety.
"Wild" apples are Malus sylvestris or just feral domestic apples Malus domestica.
Crabapples comprise the rest (>30 different species) of apples and its hybrids. Malus florida from Japan is famous for its glorious blossom for example. Malus sieboldi from China or Malus bacatta from Siberia are also crabapples. Some are true to seed, but other aren't and there are many cultivars selected by blossom or fruit display.
There are some crabapples cultured specifically for culinary purposes, like Golden Hornet that bear heavy amounts of small yellow fruits. Very good for compote and jelly.
I really like granny smith apples for the sour flavor profile, but most review websites rate it poorly.