Sure you can target whatever platforms are supported by MAUI. Note that by default the project file breaks up Windows from everything else.
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
What this says is build for Android, iOS and MacCataylst. If running on a Windows machine then also include Windows. If you want to disable non-Windows for now then comment out the first TargetFrameworks
values. Then it'll just target Windows, assuming you're building on Windows.
<!--<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>-->
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
Once you save your changes you'll need to reload the project because VS doesn't like it when you make a change like this. Once reloaded you can build and the option to publish should still be available on the context menu.