If you say Apple made $4.5b selling at $300, then the actual profit is less than half that (38%) as that was their rumoured margin back in 2018. Since then they slashed the price by $100 which would mean they were making about $29 for every HomePod sold.Prior post, the other one I posted last night.
If the $4.5b was pure profit, then they sold much more than 15m units which we can assume they probably didn’t as they discontinued it. By comparison Amazon and Google make 56% and 66% margin on their devices and occupy over 90% of the smart speaker/assistant market.