Hello,
I recently got my green card through marriage and I was wondering if I can visit Canada for 3 weeks in the next few days and be able to come back to US without any problem?
Lawful permanent residents of the U.S. need an eTA to fly to or transit through Canada unless from an exempt country of your passport. Return to the US on the green card is good. You may expect secondary inspection of your identity.
If you are a citizen of any of the 7 countries listed on the Trump executive Order dated January 27, 2017, maybe you should not travel outside of the US yet.