Short answer — yes.
Once you have your commercial drone license, you’re able to sell photos and videos you take while complying under the FAA’s Part 107 regulations.
But what about any photos or videos you took prior?
The FAA’s primary goal is safety — so they don’t care as much about your past flights as long as the flights were conductd in accordance with existing laws at the time of the flight.
If you were operating recreationally at the time, i.e. the intent of the flight was not ‘commercial’ in nature, then there’s no issue if you take some of those photos or videos from those flights and sell them. As long as you have your FAA commercial drone license, of course.
I wouldn’t overthink this one — use good judgement and you should be fine.