So, you want users to access the new URL sharepoint.contoso.com/site/newintranet when they try to access the old one intranet.contoso.com, right?
- First, I think you typed the SharePoint Online URL wrong here, it would be contoso.sharepoint.com/site/newintranet
- You can also migrate your local site's content at the root of the SharePoint online site or make the contoso.sharepoint.com/site/newintranet as the root site
- I don't think this can be achieved by using CNAME entry as you ANAME needs to point to the IP address and SharePoint online is hosted across multiple IPs. You can use HTTP redirection hosted either on an on-premise IIS or on an Azure web site. Look at this article - Redirect to SharePoint Online URL using Azure web App - for more detail about this.