I don't think so. The story is designed to introduce you to the Red Dead universe. You'll get to know the main characters, the different locations, and how the game generally works. If you jump into Red Dead Online first, you might be a bit lost as the online mode builds on the concepts introduced in the story. For example, you'll have a better understanding of the various activities like hunting and horse - taming from the story before doing them in the online version.
Personally, I would recommend not playing Red Dead Online before the story. The story mode has a carefully crafted plot that takes you on a journey through the Wild West. You'll experience the growth of the main character, the conflicts, and the overall atmosphere of the game world. When you start with the story, you can fully immerse yourself in the lore. In contrast, Red Dead Online focuses more on multiplayer interactions and some unique online - only features. But without the background from the story, you may not enjoy it to the fullest.