Hi counterkin,
Please follow the below steps to publish your application in Visual Studio 2022.
1. Click on the Build tab in your project and click on Publish Application as shown below.

Then in the published window, select the Target to Folder option and click on Next.

Then, chose the Folder Location using the Browse button and click on Finish.

Then, the publish profile will be created and click on Close.

Now your profile is Ready to publish. Now click on Publish button.

After clicking on Publish, your application is published.

Next, click on Open folder. You will see the published files.

Finally, open the bin folder and you will see the dll file with other referenced dll aswell.

Thats it.
https://imgur.com/spM38k1