WP_Query or get_posts?

get_posts() simply uses a WPQuery object and sets a few default values. In general the values it sets make it mildly more performant. But I wouldn’t worry to much about it.

get_posts() is simplier so as a rule of thumb if you don’t need any of the more involved features of WP_Query (including pagination) – then stick with it. But largely comes down to personal preference.

I would leave your example as is. Though you don’t need to explicitly set all the values as `get_posts’ sets some by default.

tech