It depends on a few aspects:

Time-taken for 1st-page ranking- It depends on the current ranking, competition, and your monthly budget. This varies from business to business, and generally, it takes 3 to 12 months.

SEO is not a one-time effort. According to the changing and updating Google algorithms, SEO work is regularly needed to maintain your position on the first page of the 1st rank.
Due to the rising competition and changing search engine algorithms, your website needs constant work on the SEO of your website from time to time. Hence, you need to maintain your rank to continue with the profit-generation.

There is no contract for it, you can terminate your services any time you want.