In Red Dead Online, XP is everything, or almost everything. Your character rank is extremely important in Red Dead Redemption 2's online mode as it regulates which weapons, clothing items, horses, horse accessories and clothing pieces are available for purchase at stores and stables.
XP in Red Dead Online can be obtained in many different ways: completing activities while in Free Roam mode, completing Story and Stranger missions, completing Challenges, taking part in the online multiplayer modes, and so on. While the XP you will gain by doing these activities is more than enough at the beginning of Red Dead Online, things slow down considerably over time, making it harder to reach higher ranks.
There's a way, however, to rack up huge amounts of XP as well as money.
This method boils down to being an infinite flower spawning glitch allowing you to pick the same flower over and over with a quick exploit, which you can then sell as many times as you want. Keep in mind that this glitch might get patched in the near future.
The basic idea is that you need to respawn right as you character completes the flower picking animation. Ride up to the flower of your choice with a horse, go right next to it as close as possible without being on top of it, and dismount in the opposite direction, so that the horse is standing between you and the flower.
You should still be close enough for the prompt to pick the flower to appear on your screen. What you need to do is press that, and in the time during which your character walks around the horse, open the menu and roll over Respawn. You'll find a new button prompt that needs to be filled in by holding the button.
Fill it with the button about halfway, after which you can use quick taps to keep it level and control timing. Basically you need to have it filled when the flower already appears in your inventory, but the animation has not yet completed. If you Respawn before the animation completes, then the flower will still be there in the same place once you load back into the game - but it will also be in your inventory.
You can also check out the above video for some visual instructions.