Sometimes bleeding happens after sex due to tearing or abrasions of the vagina or cervix. If sex hurts, you can use lubrication and ask your partner to slow down/be gentler (the myth that sex is supposed to hurt the first time is not true - sex shouldn’t hurt!) This article gives more details on what can cause bleeding after sex, and how to prevent it in the future: https://www.scarleteen.com/article/advi ... ntercourse
It’s possible that the brown discharge is due to dried or remaining blood, similar to the end of periods. Are you still bleeding? Do you have any other symptoms or pain? How are you doing apart from the bleeding?