HS. At least if you are disqualifying QBs who were at the level of Zach Wilson and Jaren Hall from consideration.
Yes, BYU signed Mangum in 2012 who was a 95 rated 4 star QB. And they signed Jake Heaps in 2010 as a 94 rated 4-star QB. But before those 2 QBs (who both failed to reach their potential), you have to go all the way back to Ben Olson in 2002 to find a QB that was "highly rated" according to your definition that signed with BYU (and even he transferred post-mission).
When looking at the QBs BYU has started over the last 20 years, the vast majority of their starts have been by players that were "mid-3 star" recruits. Yes, it would be nice to get higher-profile players. But as long as they players they are bringing in are performing well I don't give a darn how many stars they had coming out of high school.