Russia's initial recognition of the independence of Abkhazia and South Ossetia occurred in the aftermath of the Russo-Georgian War in 2008.
Why didn't Russia annex Abkhazia and South Ossetia?
Because South Ossetia / Abkhazia haven't been willing (yet). In the Russian point of view, Russia doesn't "annex" states; it allows willing states to join the federation. That's why the treaty between Crimea and Russia is named Treaty on the Accession of the Republic of Crimea to Russia, and only happened because Crimea's population was (still is) strongly in favor of joining Russia.
This hasn't happened yet in either South Ossetia or Abkhazia, although indications are it will happen eventually. See here for sources on South Ossetia (emphasis mine):
On 30 August 2008, Tarzan Kokoity, the Deputy Speaker of South Ossetia's parliament, announced that the region would soon be absorbed into Russia, so that South and North Ossetians could live together in one united Russian state. Russian and South Ossetian forces began giving residents in Akhalgori, the biggest town in the predominantly ethnic Georgian eastern part of South Ossetia, the choice of accepting Russian citizenship or leaving. However, Eduard Kokoity, the then president of South Ossetia, later stated that South Ossetia would not forgo its independence by joining Russia: "We are not going to say no to our independence, which has been achieved at the expense of many lives; South Ossetia has no plans to join Russia."
From the rest of the section there is some political impetus among the South Ossetian leadership to join Russia and become a unified "Alanian state" (if you didn't know, North Ossetia - Alania is part of Russia, and there is a historical "Alania" built by the Alan people). This certainly is the position of most of the population as well. So it looks probable that South Ossetia will eventually join Russia (or be annexed by Russia, depending on your point of view).
Something similar applies to Abkhazia as well, although as far as I can tell political resistance to integration with Russia is stronger in Abkhazia.
Edit: Looks like South Ossetia is moving forward with plans to join Russia (or Russia is annexing South Ossetia, depending on your perspective), but not Abkhazia.
Only 1-2% of South Ossetians self-identify as Russians, unlike in Crimea where it was like 60% even in the 2001 census. Ossetians, which are the ethnic majority now in South Ossetia, also have their own language, which is official in South Ossetia and in Russia's North Ossetia–Alania. It's a different matter to attract a region largely inhabited by what would become an ethnic minority to become part of your country.
So the cultural ties to Russia are less strong than in Crimea.
Nationalist movements in small countries/regions have difficult tradeoffs to consider. Even though Russia gave passports to South Ossetians and Abkhazians, which I'm sure they appreciate for the economic benefits of free travel etc. to their large neighbor, that doesn't mean they are so willing to sacrifice more of their independence. Consider e.g. what's been happening between Hungary (under Orban's government) and the EU, for instance.
The prospect of joining Russia seems more openly touted in South Ossetia:
Political elites in South Ossetia and Abkhazia have different approaches to the dual citizenship question. In South Ossetia, the citizenship process might become an additional impetus for those advocating for the reunification of South Ossetia with Russia’s North Ossetia, many of whom have been calling for a referendum on the issue since 2012. In 2020, Moscow-backed Tskhinvali leader Anatoly Bibilov proclaimed in his state-of-the-nation address that reunification with the Russian Federation was a strategic goal for South Ossetia [...]. Abkhazia, with its greater sensitivity to the territory’s self-declared “sovereignty,” seems to aim to extract maximum benefits from dual citizenship for its citizens who are experiencing severe social-economic problems.
You may also want to read what happened in 2004 when Russia tried to more overtly influence internal Abkhazia politics. It's a pretty long saga, but it suffice to say there was substantial internal pushback in Abkhazia. Even later, the issue of selling real-estate property in Abkhazia to Russians remained politically sensitive. So put it in a glib summary: Abkhazians seems to like having Russian passports, but they also want to keep the actual Russians out.
As noted in a 2018 article, in 2014:
Moscow proposed new “integration treaties” for both Abkhazia and South Ossetia, formalizing its role in running the security forces and giving it full control of their borders. South Ossetia accepted its treaty, but Abkhazia resisted the first draft of the treaty. A second version, re-titled “Union Relations and Strategic Partnership,” left many competences with Abkhazia’s de facto authorities, on paper at least.
One important point was removed that Moscow had wanted in the treaty: a provision for Russians to have a fast track to acquire Abkhaz citizenship, which would give them the right to acquire property in Abkhazia—which noncitizens are currently denied. The fear in Abkhazia is that if Russians are allowed to buy property, then the country’s prime real estate will quickly be snapped up and Russia will become the legal owner of Abkhazia. A leaked cache of emails by and to Vladislav Surkov, the Kremlin’s chief strategist on Abkhazia and author of the 2014 treaty, reveals that the property issue was a key concern in Moscow. It also shows that Moscow was frustrated it could not control the Abkhaz elite and had speculated about how to buy or win their favors. [...]
Modern-day Abkhazia is multiethnic in daily life but is an ethnocracy in its politics. In a parliament with thirty-five deputies, thirty-one have ethnic Abkhaz surnames and three are Armenians. The representative for the Gali district, Kakha Pertaya, is part Georgian, but otherwise no Georgians or Russians hold office.