It is possible to implement in .csproj to during building get Version from reference .dll and set the same version for this project.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<Version>After create .dll from this project it should return 1.0.2.0 from firstProject</Version>
</PropertyGroup>
<ItemGroup>
<Reference Include="firstProject, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>path\firstProject.dll</HintPath>
</Reference>