Congress has passed bipartisan legislation that targets background checks and "red flag" laws, sending it to President Joe Biden's desk.