Warren Buffett and Berkshire Hathaway (NYSE: BRK.A) (NYSE: BRK.B) own many stocks, but not all are great buys right now. However, Buffett has a few in his Berkshire portfolio with strong potential that are priced right, and those look like great buys now.

So, which stock should be avoided and which are buys?

Stock to buy: Amazon

It may surprise some people that Berkshire owns Amazon (AMZN 3.43%) stock, but it makes up a small position in its portfolio. Berkshire also decreased its stake by 5% in the third quarter, which seems like a massive mistake.

Amazon is just getting back into growth mode while producing strong profits. This growth has been driven by a strong effort from its North America and international commerce businesses, although its cloud computing business, Amazon Web Services (AWS), still posted decent 12% growth. AWS used to be the growth driver for Amazon, but thanks to clients optimizing their spending, it struggled in 2023. However, management sees this trend slowing and new workloads coming online, which should provide strong growth in 2024.

Additionally, almost every margin in Amazon's business has improved in 2023.

AMZN Gross Profit Margin (Quarterly) Chart

AMZN Gross Profit Margin (Quarterly) data by YCharts

This powered net income of $9.9 billion in Q3 -- Amazon's second-highest of all time.

Amazon is entering a new business phase that no one has ever experienced. It has the potential to be one of the largest cash-generating businesses in the world, making it a top stock to buy right now.

Stock to avoid: Apple

Buffett and Berkshire love Apple (AAPL -0.35%) stock. Nearly 48% of Berkshire's publicly traded portfolio (nearly $180 billion) is devoted to Apple stock, making it its largest position by far. But buying Apple's stock right now seems like a bad decision.

Apple's business isn't thriving. Year-over-year revenue has declined every quarter for the past year, with weakness coming from all segments. It also had another headwind pop up as well -- Apple was forced to stop selling its Apple Watch Series 9 and Ultra 2 due to a patent infringement.

Apple could be in for a rough 2024 with consumers not looking any stronger. This could be ignored if Apple's stock was priced correctly, but it's valued like a near-perfect business.

AAPL PE Ratio Chart

AAPL PE Ratio data by YCharts

A valuation of 32 times earnings is a very high price for any stock, let alone one with shrinking revenue and strengthening headwinds. Apple is due for a sharp pullback, and I wouldn't want to invest in it right now when there are so many better stocks to buy.

Stock to buy: Visa

Berkshire owns shares of three of the major four U.S. credit card companies, but Visa (V -0.23%) looks like the best value right now.

Visa is a payment processor and doesn't take on the debt risk of its cards (the banks that issue them do). This makes Visa a toll-booth model business, taking a small fee every time its services are used. With Visa being the largest credit card company in the world, that's a lot of uses.

In Q4 of FY 2023 (ended Sept. 30), Visa processed $3.2 trillion in payments. It converted $8.6 billion of that into revenue for the company. Because Visa is an asset-light business with few operating costs now that its network is quite mature, it turned $4.7 billion of its revenue into profits.

That's a strong business, and with revenue and earnings per share growing 11% and 22%, respectively, Visa is a perennial market-beating investment. However, it's trading below its decade-long average valuation, making it look like a great buy now.

V PE Ratio Chart

V PE Ratio data by YCharts

Both Amazon and Visa make for much better buys than Apple today. I'm confident that these two will outperform Apple and the market for the next five years.