You apply pressure to the corners of their mouth until they start to open, then open their mouth, wrap one hand around the top of the bill “this makes it harder for them to bite,” and with your other hand you push the pill as far down their throat as your fingers can reach, then close their bill and hold it closed for a few seconds to ensure they swallow of follow it up immediately with a treat they absolutely love, grapes, romaine, whatever.
If you have a goose that doesn’t like being handled you can corner them, squat over them just enough that your body has them pinned but without sitting on them, then follow up with what I described previously.
The faster you give them the pill the easier it actually is and it’s far less stressful for them, and it gets easier after three or four times. The longer you let them think about what’s going on the more they’re going to fight you and associate you in a negative way.
Treats afterwards always help to make it positive also.