It sounds like you’re describing a Merchant of Record (MoR). This is where customers pay a third-party service, which then handles payments, compliance, and then pays you.
Check out gumroad, lemon squeezy and maybe Paypal.
Also FastSpring.com