I think you have you details wrong?
"The Taft–Hartley Act outlawed the closed shop in the United States in 1947. The union shop was ruled illegal by the Supreme Court." - https://en.wikipedia.org/wiki/Closed_shop
Perhaps you are thinking of how the teachers' union could collect agency fees from non-union public school teachers?
As I understand it, that ended when Janus v. AFSCME was decided in 2018. "The Supreme Court ruled that such union fees in the public sector violate the First Amendment right to free speech" - https://en.wikipedia.org/wiki/Janus_v._AFSCME
That decision only applies to the public sector, not a Pepsi warehouse in Minnesota. However, you are still not required to join the union to work in the warehouse, even in Minnesota, only make "fair share" payments:
https://www.findlaw.com/state/minnesota-law/minnesota-right-...
> Minnesota does not have a right to work law, which means employees that are part of a unionized workforce must join the union or make "fair share" payments equivalent to the cost of union dues.
https://www.nlrb.gov/about-nlrb/rights-we-protect/the-law/em...
> Employees may choose not to become union members and pay dues, or opt to pay only that share of dues used directly for representation, such as collective bargaining and contract administration. Known as objectors, they are no longer union members, but are still protected by the contract. Unions are obligated to tell all covered employees about this option, which was created by a Supreme Court ruling and is known as the Beck right.
https://en.wikipedia.org/wiki/Communications_Workers_of_Amer...
> Communications Workers of America v. Beck, 487 U.S. 735 (1988), is a decision by the United States Supreme Court which held that, in a union security agreement, unions are authorized by statute to collect from non-members only those fees and dues necessary to perform its duties as a collective bargaining representative.[1] The rights identified by the Court in Communications Workers of America v. Beck have since come to be known as "Beck rights," ...