Start with a correct client-side implementation: a data layer that describes products, cart and orders consistently, ecommerce events that fire once each, and consent wired to the tags that need it. Verify against the store's own order records for a couple of weeks before adding anything.
Then take the platform-native improvements that need no infrastructure. Enhanced conversions for Google, a conversions API connection for Meta, and the store's own pixel or event framework where your platform provides one all recover signal on their own, and several can be configured through a managed service rather than a server you own.
Move to a server container when the case is concrete: heavy vendor scripts hurting page speed, ad platforms starved of conversions, or a requirement to control what data leaves. Budget for hosting, a subdomain, monitoring and someone to maintain it, because an unattended container that stops forwarding is worse than the browser setup it replaced.