Mobile-first indexing affects website ranking by prioritizing sites that offer a good mobile experience. Websites that are optimized for mobile devices tend to rank higher, while those that are not may see a decrease in their rankings.
Ensuring the site is mobile-friendly is crucial for maintaining and improving its position in search results.