It is where you reside usually.
Some theoretical discussions can be found at e.g. Canadian government's report on residence in Canadian family law context, but in the end you should not overthink it and interpret it "ordinarily" (which is what the government expects from you).
It is in the present tense, the first qualification has to be somewhere you can still be considered to be a resident of. An immigrant who just landed in Canada for permanent residence can claim Canada as their usual residence on the day of their landing and cannot claim their country of origin if they have no intention of returning to their country of origin any time soon (no, it is not well defined, but it does not matter for most people; for the judge, it will be I know it when I see it.).
The modifiers "usual", "habitual", "ordinary" serve to reduce the choices when your current residence may be exceptional. A worker in an offshore oil platform would claim where they usually reside onshore as their residence. An edge case could be when the worker stays at hotels or other short term residence providers in different countries while off work, then the worker has to decide on one and be prepared to justify his claim.
However, the usual residence does not have to be an exclusive concept (unlike domicile).
It is likely that frontier worker in Switzerland who only lives in France on the weekends (due to Swiss legal requirements) can reasonably claim both Switzerland and France as their ordinary residence (but only France as their domicile) under common law. Similarly, a detached worker or diplomats on assignment may claim multiple countries of "usual" residence.
An exchange student likely does not claim their current country of study as usual residence, whereas a student taking a degree program with longer duration
may be able to claim both country of study and the country where their family reside or where they have right of abode as their usual residence.
To make it clear that questions such as the above don't fully clarify which country I should answer. My answers are: I don't own, I rent in say country A. I have a job country A but obviously my employement in my current country will end because I will be moving and working in the UK after my successful visa application. And again my majority of possesions are in one country (to be moved to the UK). Three years before this the answer to all questions was Country B. Four years before that it was country C which is my country of origin.
In your situation, country A is mostly likely your current usual residence. The concept of residence does not depend on past actions or future intent; except with the modifier "usual" exceptions exist if you do not consider your current situation usual. Country A is where you currently live, eat and sleep.
Country C as my usual country of residence since it is the country I have the closest ties with (despite not having lived there for the last 7 years).
While country C is not necessarily disqualified from your usual country of residence, it is hard to justify. 7 years is a long time; if you obtained a PhD during that time, you may still be able to justify country C as where you would usually reside except for your pursuit of studies; similarly you may be able to justify the claim if you are sent overseas by an employer or the government in country C.
If you have been in country A in 7 years, claiming country A would also usually help with your application (not necessarily in the case of UK today), since a significant part of your recent personal history is in A, and you would get better treatment if your file is processed by an office familiar with conditions and documents in A.