The Sitecore Commerce Engine solution comes with a project that is used to generate proxy after you have added your custom endpoints.
If you do not know how to generate service proxy, please refer to this article https://robearlam.com/blog/so-what-is-the-sitecore-commerce-serviceproxy
I wanted to share my experience with generating Sitecore Commerce Proxy using the latest version of Odata.
Everything worked out well until I had to refer to the latest OData versions. Once I referenced the latest OData versions (7.4.4) and generated the proxy, the project could not be built successfully. There was an error.
Could not find EdmxReader ..... global::Microsoft.OData.Edm.Csdl.EdmxReader.Parse(reader);
After a lot of workarounds, i found this --> EdmxReader was renamed to CsdlReader.
So I made changes to the CommerceOps.cs and CommerceShops.cs and it worked. It looked like this : return global::Microsoft.OData.Edm.Csdl.CsdlReader.Parse(reader);
I don't like the idea of changing a generated class but I had a hard dependency to use the Odata 7.4.4 version.
Once the OData versions are standardized across Engine and Sitecore, this issue should be resolved.
After this service proxy dll was added to the Sitecore project, there were issues with dll versions and the storefront didn't load. So, i used the following xdt file to remove old references and use the latest versions, which solved the challenge.