How to run a command (using /execute) based on a player having 7 or more xp points in Minecraft?

There is an xp scoreboard type:

/scoreboard objectives add scoreboardName xp {"text":"scoreboardDisplayName"}

For XP points that already existed before you set up the scoreboard, you can use the subcommand of the /xp command called "query", with it you can get the current level and the points since the last level:

/execute store result score @s <scoreboard> run xp query @s points

Additionally, you'll probably also track people with 1 or more complete XP levels, like this: @a[xp=1..]