When you are building a BizTalk Server Solution on a DevOps agent, you need to make sure all the BizTalk SDK/Nuget components are also on the new agent you created. Refer to the following for BTS MSBuild information: https://learn.microsoft.com/en-us/biztalk/core/standalone-msbuild
One thing you can do is log onto the agent, open a command window and navigate to the folder where the project is located and try to build it yourself. Make sure all the required BizTalk SDK components have been installed on the Agent.
When you run the BizTalk Server Installer on the agent, make sure the development tools/SDK are included. In some cases you may need third party SDKs as well or a specific version of Windows, PowerShell,... the list goes on.
If you can build it on your development computer, make sure the agent is similar in terms of VS Build tools, Windows, and any other dependencies required by your BTS solution.