If you get this error:

/usr/local/share/dotnet/sdk/7.0.306/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(5,5): 
Error NETSDK1047: Assets file ‘/…/obj/project.assets.json' doesn't have a target for 'net7.0-ios/ios-arm64'. 
Ensure that restore has run and that you have included 'net7.0-ios' in the TargetFrameworks 
for your project. 
You may also need to include 'ios-arm64' in your project's RuntimeIdentifiers. (NETSDK1047) (…)

In Visual Studio open the command prompt and enter

dotnet restore -r ios-arm64

From https://github.com/xamarin/xamarin-macios/issues/14753#issuecomment-1105360239