So I recently completed BL2 I accomplished all the side quests and main story except for the raid boss. I’m currently at level 34 and I really don’t know what’d be the quickest way to level up to 50?
there are 3 levels each a little harder then the last.
NVHM - you should end up between 34 -39 , then start TVHM which should take you to around L50
UVHM you want to start as close to L50 as you can, as UVHM scales to whatever level you are.
UVHM is the hardest as it scalesc to your level, so when you start it you want your gear as close to your level as possible.
As for pushing your level ask in the help section of whatever console/PC you play on for someone to Power Level You
What @LunaticOne said. The base game is setup for two play-throughs per character, the second of which (True Vault Hunter Mode) should land you at the initial cap of 50. When you complete story the second time around, everything remaining scales to level 50 in the second play-through and you can farm there if you want to.
The game has extensions that push the level cap first to 61 and then to 72, which you may already have depending on which version of the game you purchased. That requires playing in the third play-through (called Ultimate Vault Hunter Mode) as noted above.
Note that if you start a new character, they will start at level 1 in normal mode and will also have to complete the story at least twice before you can get them to level 50 and beyond.
The original post suggests leveling to 50, and doesn’t mention platform or DLCs owned. It’s quite possible that level 50 is the cap for the OP. If so, just complete TVHM and you’ll hit 50 by the end without much effort. To change playthrough, go to the character select screen on the main menu and select your level 34 character, and it will ask which playthrough you want to do.