Pain during intercourse is commonly due to inadequate lubrication. If there is pain/difficulty in pulling back the foreskin, there might be a tight band on downward aspect of your penis tip which is called tight frenulum. Based on tightness, you might need surgery to relieve it.
Next Steps
Reach to an Urologist for examination