This is a very famous poem that starts with the line you quoted.
While there might be other poems that also begin with the line "When I am old", Tennyson's poem is the most well-known and widely recognized one.