No, (RAW) The creature has not moved so does not provoke an attack of opportunity while on a moving platform (flying carpet).
However, it can be argued that the carpet itself is subject to an attack of opportunity
The character uses a command word (action) to animate the object. Thereafter, moving the carpet is a free action (spoken words). They can move the carpet within 30 feet without standing on the carpet, and then take a move. This means the character can also stand on or off the carpet, not move, and cause the carpet to move.
After that you have two possible interpretations:
- Treat the carpet as a moving platform (No AOA's against the carpet, no extended rules)
- Treat the carpet as a mount
In the first case, it's a moving platform. No Attacks of opportunity can be made against the carpet or the player so long as the player does not move on the carpet. This would be a RAW interpretation as there is no explicit evidence of a carpet being explicitly ruled into either an animated construct or mount.
Another interpretation could rule the carpet as being mounted and thus be treated as an animated object. This would cause the carpet to act as a mount, following mounted combat rules. The interpretation is up to the DM. Note that with a large enough carpet, it would cost 5ft of movement to move from the front of the carpet to the back of the carpet (5ft x 7ft or larger).
With mounted combat, the rider isn't moving, and still has access to all of their movement as part of a move action, though mounting and dismounting requires a large expenditure of total movement. If using the mounted combat rules as an interpretation, the mount itself would incur an attack of opportunity if it moves out of a threatened space.
if the mount provokes an opportunity attack while you’re on it, the attacker can target you or the mount. (PHB, p. 198)
Also something else to consider from mounted combat:
If an effect moves your mount against its will while you're on it, you must succeed on a DC 10 Dexterity saving throw or fall off the mount, landing prone in a space within 5 feet of it. If you're knocked prone while mounted, you must make the same saving throw.
From here we would need to determine the base stats of the carpet. One method would be to pull from the Animate Objects spell and treating it as a medium or large animated object. (HP: 40, AC: 13, Str: 10, Dex: 12 - Medium) / (Large - HP: 50, AC: 10, Str: 14, Dex: 10 - Large).
Overall - with this interpretation rules are vague and you will need to work with the DM regarding the specifics of how to handle mounted flying carpet combat
Above was my suggestion on how to handle the extended implications. But to reiterate the core of you question:
Standing on the carpet and telling the carpet to move, does not expend the users move action or allow for opportunity attacks. Activating the carpet requires an action, telling the carpet to move on subsequent actions is a free action. Rules as written the carpet is a moving platform and does not itself - provoke attacks of opportunity.