leisten
to perform
To accomplish, achieve, or provide something that often requires effort or ability.
Die Mitarbeiter haben im letzten Quartal hervorragende Arbeit geleistet.
The employees performed excellent work in the last quarter.

to perform / afford
Loading your saved state.
to perform
To accomplish, achieve, or provide something that often requires effort or ability.
Die Mitarbeiter haben im letzten Quartal hervorragende Arbeit geleistet.
The employees performed excellent work in the last quarter.

The verb 'leisten' (to perform/provide/afford) is closely connected to the noun 'die Leistung' (performance, achievement). 'Leisten' is the action that leads to a 'Leistung' (performance, achievement).
Der Sportler hat eine beeindruckende Leistung gezeigt.
The athlete delivered an impressive performance.
Pay attention to the case of the reflexive pronoun. 'Sich (Akkusativ) etwas leisten' means to buy or afford something. 'Sich (Dativ) etwas leisten' means to allow oneself negative behavior.
Ich leiste mir ein teures Abendessen. (kaufen)
I'm treating myself to an expensive dinner. (buy)
In the meaning of 'vollbringen' (to accomplish/perform), 'leisten' is often combined with abstract nouns that describe an effort. Typical examples are: 'Arbeit leisten' (to do work), 'einen Beitrag leisten' (to make a contribution), or 'Überstunden leisten' (to work overtime).
Viele Menschen leisten ehrenamtliche Arbeit in ihrer Freizeit.
Many people do volunteer work in their free time.
The structure for 'sich etwas leisten können' (to be able to afford something) is fixed: subject + können + sich (accusative) + object (accusative) + leisten. The reflexive pronoun 'sich' is obligatory here.
Ein neues Auto können wir uns im Moment nicht leisten.
We can't afford a new car at the moment.
When you give or render something to someone, the structure is: jemandem (dative) etwas (accusative) leisten. Common combinations are 'Hilfe leisten' (to provide help), 'Widerstand leisten' (to offer resistance), or 'einen Schwur leisten' (to swear an oath).
Die Nachbarn leisteten der Familie nach dem Brand schnelle Hilfe.
The neighbors provided quick help to the family after the fire.
The phrase 'jemandem Gesellschaft leisten' (to keep someone company) is a fixed combination. The person who should not be alone is always in the dative.
Ich besuche meinen Großvater, um ihm etwas Gesellschaft zu leisten.
I visit my grandfather to keep him a little company.
to help
'helfen' and 'leisten' can both refer to help, but they are used differently. 'helfen' is the normal verb when someone supports a person. In this meaning, 'leisten' is usually used with a noun, for example 'Hilfe leisten' (to provide help), 'einen Dienst leisten' (to provide a service), or 'Widerstand leisten' (to offer resistance). It often sounds more formal and describes someone providing a specific kind of support or action. They can be confused because 'Hilfe leisten' means almost the same thing as 'helfen'. But you do not simply say 'Ich leiste dir'; you say 'Ich helfe dir' or 'Ich leiste dir Hilfe'.

Nach dem Unfall leistete ein Passant sofort Erste Hilfe.
After the accident, a passerby immediately provided first aid.
Die Kundin hat dem alten Mann am Bahnhof mit dem Koffer geholfen.
The customer helped the old man at the train station with his suitcase.