I see this question a lot.
Here’s the data that I have on it.
TL;DR: For SEO? Subfolder over subdomain. Always.
Here’s more context:
Hopefully this is helpful.
Here’s data from Drift:
and John Doherty’s reply:
When Monster.co.uk moved their blog from a subdomain to their root domain, Google saw it as one website and instantly increased rankings of every blog post:
Here’s another website with the same result:
Screenshot (point #2 here is crucial):