Simple under-sink plumbing redirect
It appears you have 2&quot; pipe that is glued. I would suspect that the 2&quot; pipe could handle the two 90 degree elbows but the problem is you have fitting glued right up against the wall.
It would likely require opening the drywall so you could work on/remove/replace that fitting. It appears the the plumbing in the wall is NOT straight forward as you have supply lines and an electrical box in close proximity to your drain line. (Where you drain line should be going down.)
All of that is to say that it is not simple. (Doable, but not simple.)
Is a plumber required, not necessarily.
Can you do it? If you  have any mechanical aptitude you can.
Would it be quicker and less time consuming to hire a plumber?  Probably.
How badly do you want a trash can in that space?