Is it possible to use User Agent to make sure to filter access from PC?

Is it possible to use User Agent to make sure to filter access from PC?

I am learning about User Agent Blocking or WAF Field User Agent.

Can we use User Agent to challenge all queries from PC?

If yes, please let me know thanks.

You can try to make it so that all PCs are challenged. The issue is going to be finding the user agents to filter, as different browser have different user agents.